Posts

Showing posts from September, 2013

Replacement values of a column in a data frame in R -

I have data.fr mat . I would like to create the data frame res , that means if the second column is 1, replace the first column value instead, and if it is 0, replace it with inf. How can I do this in R? c1 = c (10, 1, 3, 4, 6, 8) c2 = c (1, 1, 0, 1, 0, 1) mat = data. Frames (c1 = C1, C2 = C2)> Mat C1 C2 1 10 1 2 1 1 3 3 4 4 1 5 6 0 6 8 1> C2 = C (10, 1, 4, inf, 8) & gt; Res = data.frame (C1 = C1, C2 = C2)> Res c1 c2 1 10 10 2 1 1 3 3 INF 4 4 5 6 INF 6 8 8 Use ifelse and try it: & gt; (Res & lt; - Conv. (Mat, C2 = Eiffel (C2 == 1, C1, IP))) C 1 C 2 1 10 10 2 1 1 3 3 ING 4 4 4 5 6 INFO 6 8 8

android - Splash Screen not displaying with PhoneGap Build -

When I load my application, I have not displayed the splash screen set. Here is my config.xml file: & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Widget xmlns = "http://www.w3.org/ns/widgets" xmlns: difference = "http://phonegap.com/ns/1.0" id = "com.Mobile.test" versionCode = "" version = "1.0" & gt; & Lt; Name & gt; Mobile & lt; / Name & gt; & Lt; Description & gt; & Lt; / Description & gt; & Lt; Author href = "www.mobile.net" email = "editor@mobile.net" & gt; SMD & lt; / Author & gt; & Lt; Preference name = "phonegap-version" value = "3.1.0" /> & Lt; Priority name = "orientation" value = "default" /> & Lt; Priority name = "fullscreen" value = "wrong" /> & Lt; Priority name = "target-device" value = "universal...

Why does windows take much time for login window to reappear when password is wrong? -

This is a common problem with Windows 7 when I try to log in and the password is correct, These will, but when the password is incorrect, it takes 10 seconds more for the login window to show it again. Microsoft does not share its code, so seems difficult, but I believe I can get a basic answer from the stackoverflow community. Interesting Comments I can only guess that this is an old thing: One attacker has a way of frustration, when they give a wrong answer, I use this idea in some of my code, just call for a short while.

dynamic - How to set the parameter values for ARX model -

Image
There are two series, "A" (auto-revગ્ર variables) and "B" (exogenous variable). Please tell me how to estimate the parameters of the auto-regressive variable after setting the parameter value for the exogenable variable. Text "itemprop =" text "> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Hi cushion, I attached the answer Simon

java - Generating ANT result report from Selenium + JUnit using intellij IDEA -

Image
I do not have poetry in ANT and I am also new to development work, and I have to prepare a result report (Pass / Unsuccessful) For some of my testing project I use Intelligence, Selenium Web-Driver and Junit. I research this topic and give the most points to use the ANT to create the report. However, most examples are enough to understand, I hope someone can point me in the right direction, I am also not sure about setting up for intellijes for my test cases. I use ANT to run my test with IDE (intel) Run the exam through ant and can prepare XML / HTML reports: & Lt; Junit fork = "yes" printsummary = "withOut and ARR" showoutput = "true" outputtoformatters = "true" haltonfailure = "no" failureproperty = "test.failed" & gt; & Lt; Formatter type = "xml" /> & Lt; Test name = "com.tests.ExampleTests" todir = "$ {junit.output.dir}" /> & Lt; Classpath Refugged = ...

android - GCM and App update: how re-register if app is not open after update? -

I have an app that receives gcm notifications and in the background Service (classic pattern). The documentation says that, if an app is updated, the registration ID may be useless and it is necessary to check a new registration ID. The sample provided by Google () shows that, soon, the main activity should be checked at the Owncreate (or OnResume ). However, if the user does not open the app and immediately after app through the Play Store? In this case, there is a risk, after the update, the registration ID is invalid and the notifications (and my background service stops to update local data) is to stop? Or maybe this matter is managed with the system Google Thanks Thank you, max BroadcastReceiver that listens to PACKAGE_REPLACED create: Insert Post "itemprop =" text "> & lt; Receiver Android: name = ". UpdateReceiver" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent....

mysql - My sql:error 1227 ( 42000) -

इस सवाल का पहले से ही एक उत्तर है: 1 जवाब मैं उपयोगकर्ता बनाएं, डेटाबेस बनायें , आदि। मैंने इस प्रश्न के पिछले उत्तर देखे हैं, लेकिन समस्या अभी भी मौजूद है यहां तक ​​कि जब भी मैं mysql -h उपयोगकर्ता रूट-पी लिखता हूं तो यह त्रुटि देता है कृपया मेरी मदद करें। ऐसा इसलिए है क्योंकि उपयोगकर्ता के पास विशेषाधिकार नहीं हैं उन आपरेशनों को पूरा करें आपको उस उपयोगकर्ता को विशेषाधिकार देने की आवश्यकता है। दिखावा विशेषाधिकारों का उपयोग करें के रूप में स्वैपेशेश ने आपरेशन उपयोगकर्ता की एक सूची को देखने के लिए कहा। विशेषाधिकार प्रदान करने के लिए आप इसका उपयोग कर सकते हैं: - अनुमोदन के साथ सभी प्राधिकारों को * *। अधिक विशेष रूप से आप इसका उपयोग कर सकते हैं: - mydb पर सभी विशेषाधिकार प्रदान करें। * Myuswd 'mypasswd' द्वारा पहचाने गए myuser @ hostname पर;

centos - How to overcome maven FileNotFoundException error? -

I've installed Maven on Maivr / share / Meven and I set path maven.sh file. I restarted my computer and type mvn -version and error to get java.io. FileNotFoundException: / Usr / share / apache-maven / conf / logging at org.codehaus.plexus.classworlds.launcher.ConfigurationParser.parse (configuration parser. Jawawaiv 64) org.codehaus.plexus.classworlds.launcher.Configurator.configure on ( Configretrkjawa: 133) on org.codehaus.plexus.classworlds.launcher.Launcher.configure (Launcher.java:1231) on org.codehaus.plexus.classworlds.launcher.Launcher.MainWithExitCode (Launcher.java:409) org. At codehaus Plexus.classworlds.launcher.Launcher.main (Launcher.java:356) [sandip @ bigdatasvn ~] $ java.io.FileNotFoundException: / usr / share / apache-maven / conf / logging ^ C you'll need to check Meven configuration and ensure that the logging file is in the path. If you have installed / usr / share / maven, then it is not the same as / usr / share / apache-maven.

java - Number Guessing Game Over Intervals -

I have just started a long way to become a better codec on CodeChef. People start with problems marked as 'easy' and I did that. The statement of the problem defines the following: - N , where 1 & lt ; = N & lt; = 10 ^ 9 . It's an integer that keeps Johnny secret k , where 1 & lt; = K & lt; = 10 ^ 5 . For each test case or game, Johnny signs exactly to Ellis exactly as k . A signal op num yes / no , where - op one operator , & gt; , = . num is an integer, again satisfactory 1 . The answer to the yes or no question is: What relationship does n op num hold? If the answer to the question is correct, Johnny has spoken the truth otherwise, he is lying. Each alert program is fed and the program determines whether it is true or possibly a lie. My job is to find the minimum number of lies. Now uses the concept of tree segments, which I can not wrap my head at all. I was thinking that there is alternative data s...

java - Can we add text to a drawable? -

Image
मैं एक ड्रॉ योग्य बनाना चाहता हूँ जो इस तरह दिखता है। और मुझे पता है कि छवि पृष्ठभूमि कैसे बनाइए, लेकिन खोज के बाद भी, मैं उस ड्रॉएबल फ़ाइल को टेक्स्ट कैसे प्रदान करने में असमर्थ हूं। क्या कोई तरीका है कि ड्रॉएबल फाइल वही है जो टेक्स्ट को भी उसी के समान है? मैं पाठदृश्य का उपयोग नहीं कर सकता क्योंकि इसकी एक टैब है और मुझे पृष्ठभूमि संसाधन के रूप में सेट करने के लिए ड्रॉएबल की आवश्यकता है (जो कि मुझे पता है, कृपया मुझे सही करें अगर मैं गलत हूँ।) इसलिए मुझे एक ड्रॉएबल फाइल चाहिए, जिसे मैं पृष्ठभूमि के रूप में सेट कर सकता हूं। हाँ आप ऐसा कर सकते हैं। पोस्ट देखें मजबूत> - असल में, आपको क्लास को ड्रॉएबल का विस्तार करना होगा और पाठ को ड्रॉएबल में खींचने के लिए कैनवास सेट करना होगा। P> जैसा कि आप को आकर्षित करें विधि को ओवरराइड करते हैं, यह कैनवास लेगा और परिभाषित स्थानों पर टेक्स्ट खींच सकता है। कैनवास के लिए कई तरीके उपलब्ध हैं । जैसा कि एक ग्राफ़िक्स डॉक में बताया गया है। - कैनवस क्लास के अपने ड्राइंग विधियों का सेट है, जिनका उपयोग आप कर सकत...

html - Cloning 2 similar elements in jquery without using a new div -

I have a form with 2 dropdowns and a text box, I have to clone them all, once they are 5 divis To limit and also to increase the ID or name, I can do this by using two different elements in a div, but at the same time there is a problem with two elements because it has the same ID for both Takes. I used my html code: & lt; Div id = "element" & gt; & Lt; Div id = "ouuter_00" & gt; & Lt; Select name = "type" id = "type_00" disabled = "disabled" category = "edit" & gt; & Lt; Option value = "artist type" selected = "selected" & gt; Artist type & lt; / Option & gt; & Lt; Option value = "singer" & gt; Singer & lt; / Options & gt; & Lt; Option value = "actor" & gt; Actor & lt; / Options & gt; & Lt; Option value = "fighter" & gt; Fighter & lt; / Options & gt; & Lt; Option value = "...

c# - how can I change forecolor of a chart label? -

Image
How do I change the first color of the chart labels? Here is a screenshot of the chart I used chart1.series Tried to [0] .FontColor = color.white; But the whole chart becomes white. Try it out: this .chart1.BackColor = Color. AliceBlue; This.chart1.ChartAreas [0] .AxisX.LineColor = Color.Red; This.chart1.ChartAreas [0] .AxisX.MajorGrid.LineColor = Color.Red; This.chart1.ChartAreas [0] .AxisX.LabelStyle.ForeColor = Color.Red; This.chart1.ChartAreas [0] .AxisY.LineColor = Color.Red; This.chart1.ChartAreas [0] .AxisY.MajorGrid.LineColor = Color.Red; This.chart1.ChartAreas [0] .AxisY.LabelStyle.ForeColor = Color.Red; Here Label labelStyle.ForeColor changes the color, as you requested. Allow the modification of the property LineColor and the grid. Line color grid lines (black on your screenshot) if you need it color red And Aliceblue, of course, are for example.

javascript - Convert from binary to hexadecimal in shortest amout of code -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब सबसे आसान तरीका क्या है क्या यह जावास्क्रिप्ट में है? वर्तमान में मेरा कोड एक विशाल स्विच ब्लॉक है, क्या कोई आसान तरीका है? वर्तमान कोड: फ़ंक्शन कन्वर्टबिनोहेक्स (इनपुट) {input = "" + input; जबकि (input.length & lt; 8) {input = "0" + इनपुट; } इनपुट = [input.substring (0,4), input.substring (4,8)]; Var आउटपुट = ""; के लिए (इनपुट में var i) {स्विच (इनपुट [i]) {case "0000": output + = 0; टूटना; मामले "0001": आउटपुट + = 1; टूटना; मामले "0010": आउटपुट + = 2; टूटना; मामले "0011": आउटपुट + = 3; टूटना; मामले "0100": आउटपुट + = 4; टूटना; मामले "0101": आउटपुट + = 5; टूटना; मामले "0110": आउटपुट + = 6; टूटना; मामले "0111": आउटपुट + = 7; टूटना; मामले "1000": आउटपुट + = 8; टूटना; मामले "1001": आउटपुट + = 9; टूटना; मामले "1010": आउटपुट + = 'ए'; टूटना; मामले "1011": आउटपुट + = '...

c# - Passing a method with parameter Func and getting TResult -

So basically there is a return type in T, I want to return the generic return type. Example: Private trace endwolf & lt; T, TResult & gt; (Funk & lt; T, TResult & gt; asyncCaller, IAsyncResult asyncResult) {Trust Result = Default (TResult); Try {result = asyncCaller.EndInvoke (asyncResult); } Hold (exception exception) {// get exception details} return result; } How do I just call T and get a trashlech? I remember, I only have t. Edit: How do I tell this method? Edit: I want a general interconnection, because I'm trying a lot on different endvoks, then I want results from endwoke. I first of all used my generic endInneq & lt ;, & gt; I suggest changing the method. Public Stable Class FuncExtensions {Public Static Trashlutt and Invoke & lt; T, TResult & gt; (This fax & lt; T, TResult & gt; asyncCaller, IAsyncResult asyncResult) {// ...}} This method will make calls easier. For example, I Call a method that calcul...

ruby - How do i pass parameters as well as set headers with rest_client in http api call -

with rest_client gem I have to pass the parametes and also have to set the header of the header parameter- {"Id" = & gt; {"Id" => 376373}, "name" = & gt; "Test workflow", "playbook" = & gt; [{"Name" = & gt; "Shell_book.yml"}]} header- {accept> Application / Jason, Content-type = & gt; App / Jason, Mode = & gt; Please suggest how to do this - RestClient.put (@@ host + '/ workflow / agentless', {: params => {"module" => {"id" = & Gt; 376373}, "name" = & gt; "test workflow", "playbook" => [{"name" => "shell_book.yml"}}}}) The third parameter is. Value: response = RestClient.put (url, request:, content_type = & gt ;: json ,: accept =>: json)

Including a PHP File: cURL, Pathing, and Security Risks -

So I've heard a lot about the security hazards curls. I have to know what I am doing, security threats can happen, and if so, how can I stop it? Through the host gate, I have my own VPS (Virtual Private Server). Actually I am trying to include a file from a different domain. Both domains are in the same server. I tried to use the full path to include the file, but I'm getting permission denied error. This is the code that contains the file using cURL: $ Url = "http://mydomain.com/include.php"; $ Ch = curl_init (); Curl_setopt ($ ch, CURLOPT_URL, $ url); Curl_setopt ($ CH, CURLOPT_HEADER, 0); Curl_exec ($ ch); Curl_close ($ ch); Is this a security risk? If so, how can I stop this security risk? In addition, how can I set the permissions on the domain so that I can include a PHP file from another domain on the same server? If you are loading data from different domains, You can use the path but you can neither take the php file url and its recomme...

python - How to extract interior polygon coordinates using Shapely? -

I'm new to shouting (but excited about it), and recently I've discovered a street collision . / P> I have a polygon-sized file that I am reading through Fiona. This size-file contains both polygon and multifunctional objects and I need to create an array for each of the coordinates within it (like both external and / or internal) for each feature. In particular, two polygon objects have internal rings (and they are valid). I think there is no problem reaching outward coordinates of polygon (valuable) / multiplexing (s) ... but I'm not pulling anything for internal coordinates. Do I need to take a new perspective (i.e. linearings) here ...? Fiona.open (INFILE) in polys: def convert_polygen (infile) ): Print "Yes, I am a polygon" # How many points count each counting for the interior polygon: except for the interior_poli + = lenan (myShape.interior.coords): pass # count each external polygon external poly + = lenan (myShape .exterior.coords) How many ...

ios - UIViewAnimation Increase the memory -

Image
In my project I have implemented a ticker animation that applies scroll text horizontally. My problem occurs when I go - (empty) scrollTheBreakingNews {if (isTicker) is {self.ticker.text =}, then another view controller Memory begins to increase continuously. textToScroll; If (! Paus ticker) {if (isTicker) {NSAttributedString * str = [[NSAttributedString alloc] initWithString: textToScroll]; CGSize text size = [SR size]; If (iticaker) {float period = (text size.white + self ticker vii.fr. size.width) / 65.0f; Float startX = 0.0f; Float endx = 0.0f; If (IsTicker) {self.ticker.frame = scrollLabelFrame; If (IsTicker) {startx = self.tickerView.frame.size.width; Endx = -textSize.width; If (iticator) {self.ticker.frame = CGRectMake (initial X, 0.0f, text system.asp, 25.0f); [UIView Start Permissions: @ "" Reference: Zero]; [UIView Set Animation Crow: UIViewAnimationCurveLinear]; [UIView Set Animation Duration: Period]; [UIView Set Delegate Animation: self]; [UIView Set A...

Progress dialog bar loading error in android -

Image
I tried to add custom progress dialog bar for my app this one at a time The progress bar displays like This style is .xml code & lt; Style name = "theme.myDialog" parent = "@ android: style / theme.Dialog" & gt; & Lt; Item name = "android: textcolor" & gt; # Daac56 & lt; / Item & gt; & Lt; Item name = "Android: Background" & gt; # 160203 & lt; / Item & gt; & Lt; / Style & gt; This is the activity code. myPd_bar = new progression (restaurant_list.is, r.style.imidiolog); MyPd_bar.setMessage ("Loading ..."); MyPd_bar.setTitle ("Please wait .."); MyPd_bar.show (); Super.onPreExecute (); I want to change the font family, text color and progress dialog background color. It only changes content text color edit I like this time This title and text should have a color change. Can anyone tell me what I have done? Create a custom style and add enough a...

ruby on rails - ActiveRecord::ConnectionNotEstablished in AWS OpsWorks -

I have already tried various solutions given below, but still the only error is getting any Appreciate the lead. root @ cumulonimbus: / srv / www / myapp / current / log # cat unicorn.stderr.log me, [2014-02-15T13: 59: 29.053668 # 19768] Info -: Refresh Gemstones [Deprecated] I18n.enforce_available_locales will be the default to correct in the future. If you really want to leave the recognition of your locale, you can set I18n.enforce_available_locales = false to avoid this message. I, [2014-02-15T14: 00: 11.666899 # 19768] Information -: ADR = / SRV / www / map / share / socket / unicorn.Sock FD = 14E, [2014-02-15T14: 00 Listening on: 11.667401 # 19768] Error -: ActiveCord :: Connection NoteStart (Activation :: ConnectionNotStablish) / Home / Deputy / Bundler / IMAP / RUB / 19.11 / Games / Activirus -3.2.11 / Lib / Active_Record / Connection / Adapter / Abstract /connection_pool.rb:410:IN 'recovery_connection' / home / deputy / bundler / mipp / rbi / 1.9.1 / games / act...

network programming - Can a Perl program sniff packets from multiple NICs simultaneously? -

So I'm planning to create a network analyzer using Perl. But before I started, I have to answer the question, can a Pearl program really smell the packet together in many NICs? One feature of the program IM is that it should sniff the packet across the entire LAN within the switch. Is this possible in Pearl? Sniffing packets in the entire LAN are not possible. This is only possible if your switch supports it. Many swaths have an option to copy all traffic to monitor / sniff a snake.

opencv - Stitching images in python -

Image
I want to sew multiple (5 or 6) images using a python. I'm new to Python, but I want to use it because it runs on the server and opensource. OpenCV is very well able to do this and will be my preferred option, but the functions are mostly in C ++ and I can not find any such example in Ajithan (though it should be enabled) I found this link: but I think That is, I am not able to exercise. I also got a lot about Pantotal and Hugin. Hugin should be able to sew using HIV (the Hugin scripting interface), but the documentation is very rare. I should get an example should work, but I can not get Hugin and HSI to work in Python, there is no lecture on how to install / import the library. Is there anyone who can help me this? I came from programming in PHP and is actually new to Python, OpenCVI and Hugin. Many thanks I think this is the code that you want Import Input image: - Output image: -

database - SQL Contains From Table Column -

There are two tables in my database, both of which are the columns named "company name". I have a similarity between their names in these columns I want to compare. For example: Table1.CompanyName = 2i Ltd /// Table2.CompanyName = 2i Limited I think you mean: how to get together in both of these and compare parity or some fuzzy. You prefer using it using the oracle text which allows fuzzy mailing: select t1.CompanyName from Table1 t1 on table 2 T2 (T1.CompanyName, t2 .companyname) & gt; 0 There are possibilities for reach, but you have to write it your own. See (many codes to paste).

ruby on rails - Why are my RSpec test failing -

यह मेरा मॉडल है: class रेस्तरां & lt; ActiveRecord :: बेस मान्य: नाम, उपस्थिति: सच, विशिष्टता: {case_ संवेदनशील: झूठी} अंत यहां टेस्ट है: 'spec_helper' का वर्णन करें रेस्तरां @ पूर्व रेस्तरां = रेस्तरां.न्यू (नाम: "मॉमफुकु") अंत विषय {@restaurant} इसे (जवाब देना चाहिए): (होना चाहिए) नाम होना चाहिए ("_valid}" जब "नाम मौजूद नहीं है" का वर्णन करें {@restaurant .name = ""} इसे {not_not be_valid} अंत का वर्णन "जब नाम पहले से ही लिया गया है" से पहले करें restaurant_with_same_name = @ restaurant.dup restaurant_with_same_name.name = @ restaurant.name.upex restaurant_with_same_name.save समाप्त हो जाना चाहिए {should_not be_valid} end end जब मैं परीक्षण चला रहा हूं, तो मुझे विफलता मिलती है: $ बंडल एक्स्प्ले rspec spec / मॉडल .. एफएफ़ विफलताएं: 1) रेस्तरां जब नाम नहीं है वर्तमान वैध विफलता / त्रुटि नहीं होनी चाहिए: यह {चाहिए_not be_valid} अपेक्षित # & lt; रेस्टोरेंट आईडी: शून्य, नाम: "", बनाया गया_एटी: श...

php - Nested form submitting parent form -

There is a problem implementing an address finder at this time. I have all this work on my own, I Where to postconia, postcode through JSON knocks back those addresses that I put in a selection and then I give it back to the chosen address ID. The problem occurs when I integrate it into my shops checkout page. I look up the address through the post and find it in a form. When I press the submit button to look for the address, it submits the entire shopping form as if I want to buy something. What am I thinking, if there is a better way of doing this, ie not with forms or form one form in one form and triggers nested form action only I think that Can I use Ajax but I am unable to achieve anything in the work and will still use the form element? text "> You can stop sublit by default $ ('# form'). Submit (function (evt) {evt.preventDefault (); // Submit your postal code $ ('#Format'). Submit ();});

javascript - Unable to get drop-shadow on the bars -

Image
I am working on a chart once and I need to get a chart that looks like this: Here's what I've tried: .attr ("id", "drop-shadow") .attr ("height", "130%"); But that does not work. How do I fix this? try it out. The chart looks the same as the image. But I did not add a drop shadow. Added ellipse is being created earlier and gives the same effect as the above. svg.selectAll (". Alpes"). Data (Data). Center () .append ("ellipse") .attr ("cx", function (d) {return x (d.age) + 30;}) .attr ("cy", function (d) {return y (0 );}) .attr ("rx", 35) .attr ("ry", 5). Style ("fill", function (d) {return d.color2;}) it is very simple When we are in the oval position then it is a drop shadow Works like that. Sorry I have no time to get a paradox, but you can definitely modify it. If you want to do it with a drop shadow There is a Javascript l...

python - PyQT project organization -

I want to organize my PyQT project, I tried to put the UI in a subfolder and import it like this GUI_sensors_extended Import Ui_SensorsWindow_Extended from import sys.path.append ('UI / gui_sensors') but it gives me an error because it * Ui_SensorsWindow * , ui-class which was inherited in * Ui_SensorsWindow_Extended * , what suggestions do you have to organize my project Give it Not? And how can I handle it in code? One important thing to remember when configuring a dragon is the project: currently running script The directory is automatically added to the beginning of sys.path . So if you put your main.py script out of your package in the top level container directory, it will guarantee that the package imports It will always work, no matter where the script is implemented. For example, here is a simple project structure: project / main.py package / __init__.py apap.py ui / __init__.py mainwindow.py The script should be very low main.py , and t...

Dynamically "attach" a form in Rails 4 -

Assume that I have a post model that has several comments where all the posts were shown In the post # index page, I want to allow users to add their comments for specific posts (I know that it does not matter much, this is a common idea) . The method of "brute force" will have to attach a form to each post element, but this is bad stinking. I'm sure there are better options which I can not think of now Therefore, appreciate the help, therefore. Thanks, Roy (P.S. - A good example would be FB page in which a user can comment on each post in the timeline, and I think having a form for each one Is not due to ...) You can find JS & amp; Ajax, like this: # config / routes.rb Resources: Post resources are: Comments # app / assets / javascript / application.js $ (document) expired .on (click " "," A.new_comment ", function () {# id = $ (this) .attr (" id "); $ .ajax ({url: $ (this) .attr (" href "); success: fun...

json - json2sstable cassandra gives error like "Upgrade to 1.2.5 first, and run upgradesstables" -

. itemprop = "text"> I want to insert the json2sstable option to insert JSON data into the cassandra sstable My sstable is: cid | Key | Ts 101 | Ramu | 686 I want to put another line through json. The json file is: [["key", "raju"], ["[" "cid", "102"], [" Ts "," 687 "]]}] I am running as follows: D: \ cassandra \ bin & gt; Json2sstable k demodb -c data_points I am getting this error .. java.lang.UnsupportedOperationException: SSTable data_points -a-1- Data. Db is too oldto open 1.2.5 First upgrade, and run upgradesstables on org.apache.cassandra.io.sstable.Descriptor.fromFilename (Descriptor.java:235) org.apache.cassandra.io.sstable.Descriptor.fromFilename (Descriptor.java: 204) on org.apache.cassandra.io.sstable.SstableWriter. & Lt; Init & gt; (Org.apache.cassandra.tools.SstableImport.importUnsorted (SSTableWriter.java:60) at sstableImport.java354) org.apache. C...

zend framework2 - Zf2 change layout depending on loaded modules -

I have been searching for more than a week on the internet, but I can not find anything on this ... So I thought I would like to ask a quick question here: Is it possible to modify the layout based on the module loaded in zf2? I mean, I have 3 modules: 1. Blog 2. Administrator 3.ads If I disable the blog from application.config.php, then is it possible to include a blog page to disappear in the menu page? Example: Before disabling the menu: | Blog | Administrator | After disabling the blog, the ad menu: | Administrator | Advertisement Is this possible? Thanks for your input !! This is easily possible because all the layouts are rendered in the navigation. Your module should only be placed in one navigation configuration and add their entries to their own module.config.php . If the module is disabled, then the configuration will not be there and hence it will not be rendered at all.

c - Most memory-efficient way to define hundreds of double constants -

What is the most memory-efficient way of defining hundreds of double (64-bit floating point) constants for use in embedded C program? Please note that this application is archive-bound and should save me as much RAM as possible. An Atom ARR 8 MHz 32 K Flash with 2048 B RAM. In large part, the method of maintaining a constant is to not use memory, file it and read them as needed. If you can not do this, then the constants should be made part of the program, and they will keep the memory in one way or the other, either in the data segment or in the instructions immediately. If absolute precision is not required, you may be able to reduce the data instead of float instead of double . Some processors provide encoding to simple floating-point constants in architecture instructions. If you are targeting such a processor, then you should study your documents to know what constants are. It is unlikely to be useful for normal data. If there is a pattern of data, then you m...

trigonometry - Simplifying atan(tan(a+b)) -

I wonder why it does not work as expected: + Y & lt;% pi / 2); Let (x + y> -% pi / 2); Atan (tan (x + y)); This reduces: atan (tan (x + y)) ie not at all . I expected that it would be less than: x + y Try triginverses . (% i9) atan (tan (x + y)); (% O9) come (t (y + x)) (% i10)%, triginverses = all; (% O10) y + x

lucene - Sitecore 7 Search, cannot access a disposed object -

I'm working with some Cycorecore 7 search codes. Example below (var references = Index.CreateSearchContext ()) {// .... Build predicates var query = context.GetQueryable & lt; SearchResultItem & gt; (). Where to predicate; Return query. GETResults (); } This works fine in SOLR, but standard is used with Lucene, whenever I use SearchResults & lt; SearchResultItem & gt; I refer to a property in GetResults ()) , " can not use a disposable object " with sitcom errors. It appears that does not encode GetResults () and is still hung on the search context. Has anyone come before this and know how okay? thanks Ian / div> It looks like SearchResults & lt; T & gt; In the context of SearchHit and LuceneSearchProvider does not open a reader, the new version of Lusen automatically closes the reader, I think you return the wrong type You may have to: var query = context.GetQueryable & lt; SearchResultItem & gt; (...

File download control - delete file without validation? -

नमस्कार XPages प्रोग्रामर। मैं एक सरल XPages फ़ाइल पुस्तकालय पर काम करते हैं। इसे हासिल करने के लिए मैं FileDownload नियंत्रण के साथ FileUpload नियंत्रण का उपयोग करता हूं। जब मैं एक नई फाइल बनाऊं, तो मैं उसका नाम दर्ज करूँगा, और एक फ़ाइल चुनें मैं सेट करता हूं कि कोई फ़ाइल अपलोड करने से सत्यापन मान्य नहीं होगा, इसलिए मैं किसी निर्दिष्ट नाम के बिना एक फ़ाइल संलग्न कर सकता हूं। इसके अतिरिक्त मैं इसे पूर्णरैब करने के लिए सेट कर देता हूं, इसलिए एक फाइल अपलोड करना एक पल में होती है और फ़ाइल फ़ाइल डाउनलोड में दिखाई देती है। समस्या तब होती है, जब मैं फ़ाइल अटूट- I के कचरा चिह्न का उपयोग कर उस अटैचमेंट को हटाना चाहता हूं। क्या कोई भी समाधान उपलब्ध है? = "पाठ" itemprop = "text"> मैंने कामकार्ड मार्क ल्यूसिंग का सुझाव दिया था - एक समान बटन बनाया (दायर डाउनलोड की गई जानकारी से प्रयुक्त छवि) और फिर इसे सत्यापन डेटा के बिना प्रक्रिया डेटा के साथ पूर्ण ताज़ा करने के लिए सेट करें। कोड में JSSS फ़ंक्शन deleteAttachments () {var attList = dDocument.getAttachmen...

java - Alert Message is not displaying when i click h:command button in xhtml -

The warning message is not showing when I click on the button. If I click on a button, it should show a warning message as a success with a delay of 3 minutes. When I click on the button, first it is not responding second time to get value from Bean Why the reason for the first time is not being loaded, what is the reason? XHTML code: & lt; Html xmlns = "http://www.w3.org/1999/xhtml" xmlns: h = "http: // xmlns .jcp.org / JSF / html" & gt; & Lt; H: top & gt; & Lt; Title & gt; Facet & lt; / Title & gt; & Lt; Script & gt; Var myVar; Function myFunction () {myVar = setTimeout (function () {message ();}, 3000); } Function message () {myVar = setTimeout (function () (if (# {mytest.count} === 0} {warning ("failed");} and {warning ("success");}}, 3000) ;} & Lt; / script & gt; & lt; / h: top & gt; & lt; h: body & gt; & lt; h: form & gt; & lt; h: command button onclic = ...

Timeout a python function in windows -

I am trying to implement the timeout for a particular function. I have examined many questions in the SE and I have not found any problem, which matches my problem, because I'm running a dragon in Windows Timeout applies to one Python function on which I do not have control, i.e., it is defined in the pre-designed module. Python function is not a subprocess I am doing a pre-made custom module (MyModule) that is developed for specific tasks, and defined in it Functions are a function (MyFunk) due to external factors, it always has the tendency to walk, and I do not want to have the script hanging script. I am planning to add a timeout feature, as stated, after the execution of MyModule set_timeout (T) MyResult = MyModule.MyFunc () #MyFunc () or after T sec (Priority But the latter) After the expiration, go to this part of the script. I happened: The print 'myfun not fully executed' Second: print 'myfang full' But I'm not sure Which module to us...

java - GWT DevMode - cannot pick up changes in the UI code on browser refresh -

I have a GWT app that does not change on UI code, even I refresh the browser (No error, the app works fine). Can the app be run via $ mvn gwt: run Could it be that the outputdirectory is not set correctly in Maven POM ?: [Warn] Your POM does not match the web-INF / Classes folder web hosted for the GW hosted browser to see your classes. I also have this warning, but it is okay for me because I want to use Maven's default target directory for my creation. I am ... (hence there are no artifacts under / src / main / webapp). The Gwt-eclipse plugin selects the output-path path on the launch, so I have never encountered any such problem ... Can you make sure that all your files are unlimited / target /? Additionally, are you sure that this browser is not a caching issue?

c# - Sending sms from Windows Phone 7 application -

In my Windows Phone 7 application, I want to send an SMS where the message should contain data from my previous page in my application. The data I want to display is: if (this.NavigationContext.QueryString.ContainsKey ("Date_Start")) {// If it is available, then parameter value date = NavigationContext Get the .QueryString ["DATE_START"]; Datee.Text = date; } If (this.NavigationContext.QueryString.ContainsKey ("News_Title")) {// If it is available, get the parameter value ntitle = NavigationContext.QueryString ["News_Title"]; Title. Text = nitlal; } (This.NavigationContext.QueryString.ContainsKey ("News_Description")) {ndes = NavigationContext.QueryString ["News_Description"]; Description. Text = ndes; } I have written the following code in the button click: Private zero btn_text_Click (Object Sender, RoutedEventArgs e) {SmsComposeTask smsComposeTask = new SmsComposeTask () )); SmsComposeTask.To = "+ 91-97789...

apache - Adding some extra rewrite code to existing main rewrite code -

मैं वर्तमान में यह मेरे .htaccess में है: RewriteEngine On RewriteCond% {REQUEST_URI} ^ (। *) // (। *) $ RewriteRule % 1 /% 2 [आर = 301, एल] RewriteRule ^, $ $ 2.php rewrite_params = $ 1 और (*।) (*।);? PAGE_URL = $ 2 RewriteCond% {QUERY_STRING} base64_encode * [या। (*।) ] RewriteCond% {QUERY_STRING} (& lt; |% 3 C)। * स्क्रिप्ट *। (& gt; |% 3E) [एनसी, या] RewriteCond% {QUERY_STRING} वैश्विक (= | [|% [0-9A-जेड] { 0,2}) [या] RewriteCond% {QUERY_STRING} _REQUEST (= | [|।% [0-9A-जेड] {0,2}) RewriteRule ^ (*) $ index.php [एफ, एल] मैं कुछ नए कोड को जोड़ना चाहता हूं जो फिर से लिखता है: स्टोर / कुछ-नाम / से: shop.php? Shop_id = some-name मैं अन्य रीरलाईट्स को प्रभावित किए बिना या अतिरिक्त को प्रभावित करने वाले अन्य पुनर्लेखनों को कैसे प्रभावित कर सकता हूं? आप अपने नए नियम को अंत में जोड़ सकते हैं: RewriteEngine On RewriteCond% { REQUEST_URI} ^ (। *) // (। *) $ RewriteRule % 1 /% 2 [आर = 301, एल] RewriteRule ^, $ $ 2.php rewrite_params = $ 1 और (*।) (*।);?...

linux - Measure page faults from a c program -

I am comparing some system calls where I read / write memory from / is any API defined that C ? is defined to measure page faults (pages in / out)? I found this library but it is for AIX I found nothing for Linux. Edit: Send me the Time & amp; If there is anything available for use within the C command in Linux, then just search. is the function (SVR4, 4.3BSD.POSIX.1-2001; but not all fields defined in standard Are). There are several Linux, but many interesting fields are listed: tall ru_minflt; / * Page reclamation (soft page fault) * / tall ru_majflt; / * Page fault (hard page defect) * / tall ru_inblock; / * Block input operation * / tall ru_oublock; / * Block output operations * / rusage is also reported (only usable in external programs) This is a / usr / bin / Time is used by the program (it prints minor / major pagefold matters).

c++ - How to arrange the loops to check for numbers -

I have a program that reads the credit card number. I think it ensures that 16 numbers are added, no letters, and want to add as many spaces (although they are not counted on numbers). Is there a function or set of functions to do this, or would I just want to make a bunch of times and if the loops that use isdigit () and islpha (), through an element of the array at a time Do you go Four Card New [32]; Cout & lt; & Lt; "Enter credit card number:"; Cin.getline (Cardnom, 32); // Read the full line for the name There are several things you can do . For example using std :: find_if with custom idea, for example: bool IsCharIllegal (char ch) {// returns true or false that your Accurate requirements are based on} then: get it automatically = std :: find_if (card new, cardam + 32, i.e. e.l. lagal ); If (this found! = CardNum + 32) // invalid character was entered! There is one case to use std :: string instead of a raw char array: std :: st...

css - Line Break on Space -

Is css treated as a space line break possible? I have HTML: & lt; Li & gt; This and that & lt; / Li & gt; I like this to show: this and that You can try styling it width: 0; Together with the default overflow: visible , this will generate that effect but note that overflow Could be forced to Edit : display: table (instead of block ) or display: inline-table (instead of inline-block ) can fix those issues

php - At startup, run AJAX request every 10 seconds -

This is in response to the SO problem found here - & gt; This post has helped so much, but when I tried to do it in accordance with my needs, it was not working right now. I have a PHP script which is my database. When I point directly to my browser at 'create_new_job.php', then the script works fine. My problem is that I do not seem to run an AJAX request to run scripts per 10 seconds when my main page loads can. My PHP script: 'create_new_job.php' My main page: index.php to enter data in the database is in my index.php : & lt; Script & gt; Function newjobs () {var inputjob = $ .ajax ({url: "create_new_job.php", complete: scheduling webs}}; Inputjob.done (function) (warning ('job added!');} Inputjob.fail (Function (data) {warning ('job not added ....')}}} function schedulonwibes () {setTimeout ( First of all, I get an error on line function () {newjobs ();}, 10000);} & lt; / script & gt; But when I re...

Cannot import .py file to ipython notebook -

I'm already sorry for the "I can not get it to work": I have a How do I load? .py file in IPIthon notebook? I want to convert the Python code to Notebook (simple script and later scripts in which nbconvert instructions - see below the included file). Maybe I'm doing it wrong, but maybe something is wrong with my set-up. When I drag the .py file to the notebook's file list, I get the message Invalid file type: Uploaded notebook to .ipynb files. I have also tried to change the extension on .ipynb (keeping the dragon script unencrypted); To a great extent, I found an error: Error loading notebook: Bad request What is wrong with anybody? System Info: I'm on OS X (10.8, Mountain Lion), using Firefox 28.0 and Anaconda 1.9.2 (x86_64), which provides Python 2.7.6 and iPython 2.0. Anaconda is not on the default path; I add it to a bash session from which I again launch the notebook with ipython notebook , and I usually open and edit the ...

sql - Hadoop: Why Hive works so slow even on a tiny table? -

I use JDBC from Scala to get data from the hive. In the hive I have a simple table with 20 rows in the following format: user_id, movie_title, rating, date I request nested selection to create users group by movie Select different user_id for each user_id: 2) Select different movie_chirtals / select all movies that are viewed by the user. 3) For each movie_title: Select specific user_id / Code> 20 rows L These nested queries 26 minutes on local hive table! The hive first user_id after one minute! Question: 1) Why is the hive so slow? 2) 3 Any way to optimize nested selection? The Hive used the MapReduce framework to process the questions, the continuous upper boundaries per criteria Has a decent amount of. Each of your questions (which is a reasonable amount due to your nesting hunt) needs to spin a maprand job and it takes time for any data you want. The new versions of the honeycomb are very much more sensitive but still not ideal for this type of selection....

ajax - Make javascript execute linearly -

I am making a game when a piece ('.draggable') is taken, then let me first call AJAX call (move_script .php), which will validate the move and then save it to the database. After that, I want to run the second AJAX call (past_moves.php) and inquire about the database and write a new move. My problem is, that sometimes the second AJAX call pulls the results before it is the current trick. I have used microtam (); In the PHP code to see what is happening, and every time the recent results are not removed, the second is completing the Ajax script first (most recent results appear, but every time this will not happen often, It seems random, every 5-15 times or so) Code: & lt; How can I ensure that the second ajax call will not be done before? script & gt; $ (Function () ($ (".draggable") .dragable ({stop: function (event, ui) {var start = $ (this) .attr ('id') // ajax call number 1 $ .ajax ( {Type: "POST", url: "../move_script.ph...

hibernate - Grails GORM JOIN in query -

मेरे पास एक इकाई है जो कि अधिसूचना और उपयोगकर्ता : वर्ग अधिसूचनाएरिजिएपमेंट लागू करना सीरियलजैबल {सूचना अधिसूचना उपयोगकर्ता प्राप्तकर्ता प्रयोक्ता स्थिर मानचित्रण = {टेबल 'अधिसूचना_प्रतिष्ठित' संस्करण झूठी अधिसूचना कैस्केड: 'सभी' प्राप्तकर्ता उपयोगकर्ता कास्केड: 'सभी' आईडी जनरेटर: 'असाइन', संमिश्र : ['अधिसूचना', 'प्राप्तकर्ताउज़र']}} मैं क्वेरी को बनाना चाहता हूं जो विशिष्ट उपयोगकर्ता को निर्दिष्ट सभी नोटिफिकेशन प्राप्त करता है, लेकिन मुझे सूचना फ़ील्ड चाहिए उत्सुक उत्प्रेरित से पूछताछ अनुभाग में उल्लेखित के रूप में एन + 1 से बचने के लिए पॉपुलेटेड होने के लिए परिणाम पर पुनरावृत्त किया जा रहा है (डिफ़ॉल्ट जानकारी के लिए प्रत्येक क्वेरी के लिए एक क्वेरी और एक आधिकारिक फ़ील्ड के अनुसार प्रत्येक चयन का चयन करें)। मैं मानचित्रण को बदलना नहीं चाहता और अधिसूचना से आलसी: गलत को सेट करें, लेकिन इसे क्वेरी में निर्दिष्ट करें ()। मेरी क्वेरी (जैसा है सीएस कहते हैं): def resut = NotificationRecipient.createCriteria ()। ...

"openssl verify" gives OK for bad certificate chain -

निम्न वी 3 एक्सटेंशन के साथ एक स्व-हस्ताक्षरित रूट सीए प्रमाणपत्र, रूटकेर्ट। पी है: X509v3 एक्सटेंशन: X509v3 कुंजी उपयोग: प्रमाणपत्र साइन X509v3 मूलभूत बाधाएं: सीए: सही rootcert.pem में CA फ़्लैग को सही पर सेट किया गया है & amp; इसका मुख्य उपयोग प्रमाण पत्र हस्ताक्षर करने की अनुमति देता है। रूटसीर्ट.पीएम निम्नलिखित वी 3 एक्सटेंशन के साथ एक प्रमाणपत्र foocert.pem पर संकेत करता है: X509v3 एक्सटेंशन: X509v3 मूलभूत बाधाएं: सीए: गलत X509v3 कुंजी उपयोग: डिजिटल हस्ताक्षर, अस्वीकार, कुंजी एनसिफरमेंट foocert.pem में CA फ़्लैग को झूठी और amp पर सेट किया गया; इसका मुख्य उपयोग प्रमाण पत्र हस्ताक्षर करने की अनुमति नहीं देता है। लेकिन कह सकते हैं कि फॉकार्ट पीम ने रूजसर्ट पीम्म पर हस्ताक्षर किए हैं। फोकर्ट की एक प्रमाण पत्र श्रृंखला बनाएं; रूगुकेर्ट: बिल्ली foocert.pem roguecert.pem & gt; Roguechain.pem openssl सत्यापन का उपयोग करके सत्यापित करें। सत्यापन सफल है: $ openssl सत्यापित करें -सफाइल रूटकेर्ट.पीम roguechain.pem roguechain.pem: ठीक x509_strict के साथ सत...

java - Android - Issue With Displaying Fragments -

I just can not find the pieces to display ...! And I know that this is a problem within my onCreateView . Does anyone possibly look at this issue and think about some sort of solution ?? If I exclude line 34-59, then the first piece is actually displayed, which is super.onCreate (savedInstanceState); with onCreateView , and concludes with }); confirmButton.setOnClickListener for . However, the comments were made with those lines, the tab for the second piece, when clicked, the app leads to crashing. I can not even save the information that I want to get from the first piece by doing so ... so I need those lines I sincerely appreciate all and any help, your Thank you very much for the time! public class Lyric Adittr Fregment expansion (private editing text mTitleText; private editing text mBodyText; private Long Maraiaidi; personal songs DbAdapter mDbHelper; @ Override public Dekenkretiwu (Leautifltr Infletr, View Group container, Bundle saved Instensstet) {// Tudo Auto...

javascript - Wireing Breeze (with Angular) to an existing WCF Data Service -

the small I have an existing WCF data service, in which I wipe to use Can anyone show an example of the Nobie level to do this with the use of the actual database (Bus Odata service)? long I have an existing WCF data service which is already in use by a WPF app. I am experimenting with web development and want to wax the winds to use that service if it matters, then I am using kangaroo (and through hot towels) I'm installing from. Angular Newsletter Package). I've been Googling in a fair amount and I'm stuck. I can see two ways underlined by my search: First Make a Air Controller For my web app on the server side I think this problem is with metadata. With my limited understanding I need to wind up all the meta data of my WCF data service. I know how to get the meta from my WCF data service (URL + $ metadata), but I do not know how to tell the bridge. Second In this way the implementation is more ambiguous I found the answer accepted on ...

c# - Need an algorithm to calculate all variations (Combination Calculation) -

इस सवाल का पहले से ही एक उत्तर है: 63 जवाब मेरे पास सूची है उदाहरण के लिए यदि आइटम की गणना 4 है, तो आउटपुट होगा; आइटम: {1, 2, 3, 4} ResulSet: {12} , {34} {13}, {24} {14}, {23} आदेश कोई फर्क नहीं पड़ता, {12} को कवर करता है {21 }। आइटम गणना 6 के लिए, आउटपुट होगा; आइटम: {1, 2, 3, 4, 5, 6} ResulSet: 12 34 56 12 35 46 12 36 45 13 25 46 13 26 45 14 23 56 14 25 36 15 23 46 15 24 36 15 26 34 16 23 45 16 24 35 16 25 34 सह कृपया मुझे एक रास्ता दिखाओ? धन्यवाद। संपादित करें: सवाल वास्तव में पढ़ने के लिए कम है, और यदि आप प्रश्न पढ़ने के लिए 1 मिनट लेते हैं आप देख सकते हैं कि अधिकांश लोगों की तरह डुप्लिकेट नहीं है (शायद वे अर्द्ध-अशिक्षित हैं) संयोजन {1, 2, 3, 4, 5, 6} है 123456 और जैसा कि आप शीर्ष पर देखते हैं, यह ऐसा नहीं है जो मैं देख रहा हूं। प्रश्न पढ़ें अगर आप मदद करना चाहते हैं या बस बंद हो जाएं। एक अच्छा दिन हो। क्योंकि आपके पास हमेशा आपके संयोजन में दो सदस्य हैं, पाश के लिए एक साधारण नेस्टेड काम करना चा...

php - how to display more than one array -

After I've found a problem with my script, I still have to find out more than one array to find I'm trying to show only more than one array Here's the output: 20140426100000 here PHP is: Would you please tell me how to display more than one array which would display it like this? 20140426100000 20140426110000 20140426120000 20140426123000 20140426140000 20140426143000 20140426210000 20140426230000 20140427000000 20140427003000 20140427010000 20140427013000 20140427020000 20140427110000 20140427120000 20140427123000 20140427130000 Your error is one of an HTML. You can change your & lt; Br> Remembering the ending bracket on one of the tags , this does not show you the output on your page. echo "& lt; br & gt; & lt; / br; & Lt; - here

Custom Form Validation in Django-Allauth -

I want to do some extra verification on the field in django-allauth. For example, if I want to stop using the free email address, I want to run this method on signup def clean_email (auto): email_domain = self.cleaned_data ['email' ]. Split ('@') [1] If the email_domain itself is bad_domains: forms raise.ValidationError (_ ("Registration is prohibited using a free email address. Please provide a different email address.")) In the same way how do I want to run the custom verification on different areas compared to the email address? There are some adapters on the Elephant configuration. For example, this is a: ACCOUNT_ADAPTER (= "allauth.account.adapter.DefaultAccountAdapter") specifies the adapter class to use, so that you can change some default behavior. You can specify a new adapter by override the default one. Simply override the clean_email method. MyCoolAdapter (DefaultAccountAdapter): def clean_email (auto, email): ...