Posts

Showing posts from March, 2012

Android show dialog like with GoSMS -

Image
In the Gosms app, we want to see the newly received SMS messages in the phone desktop and I have this capability in this application. I'm trying to use simple and alerts_log in onStop () look like this: secure void onStop () {builder.setMessage ( "Test message") Kset Knabl qualified (true) KsetPositiveButton ( "OK", the new DialogInterface.OnClickListener () {public void Click (DialogInterface dialog, int id) {dialog.cancel () ;}}); AlertDialog Warning = Builder.Create (); Alert.show (); Super.onStop (); Logs. ("Onstop", ""); } But it could not work correctly. After that I am trying to show this dialogue through service. All the methods do not work for me correctly Please help me to do this Screenshots: You need to find out whether your app is background or foreground Is in or not Approach: Add broadcast receiver to listen to the incoming message Check if your app is in the foreground or not If it is in the ba

ios - How do I set UIButton background color forState: UIControlState.Highlighted in Swift -

Image
After I can set the background color for a button, but I can not work out to set the background color Method UIControlState.Highlighted . Is this possible? Or do I need to go down the setBackgroundImage path? One way to go will be two IBActions when pressing a button on a button, release a background color Controlling Import UIKit Class ViewController:. UIViewController {@IBOutlet Weak Up Button: UIButton! ButtonClicked function @IBAction (this: AnyObject) {// touch action button.backgroundColor = UIColor.blueColor )} Override Function ViewDidLoad () {super.viewDidLoad ()}} After adding the duration, you see a complete option for your button, you can set a background color But not for the specified state you can only set the background images now obviously if you like this Instead of doing the method I'm marrying using above show, you can load an image of the desired color as the background image using the setbackgroundImageForState property.

mongodb - What's the easiest way to store a large object in Meteor using GridFS? -

I'm trying to backup a lunar index to Mongo (daily), and because it's running around 13 MB I'm triggering MongoError: The document is bigger than the overlay size Errors I would like to use GridFS to solve the problem, but I have a glimpse of a time to click . In simple words: Within the meteor, I want to save a 13 MB JSON object using the gridfaces, and then be able to retrieve it if necessary - only on the server. I have gone through the file-archive and archivefox docs, and they are still very complex for what I am trying to accomplish, and processing only the contents of a variable (Or, more likely to be, they do, and I just do not remember it.) This is what I want to do, in the phony code: / P> backup = new GridFSCollection ('backup'); Var backdata = (sorted search index data object); Backup.insert ({name: 'searchindex', data: backup data, date: new date). GetTime ()}); Recover Var = Backup. FindOn ({name: 'searchindex'}); An

java - Using BigDecimal to Print Pi: Code is inefficient and doesn't work -

I am playing with BigDekalk today, and ended up with the code below. There is no problem according to my compiler, but after walking I get a few exceptions. Any help is appreciated, thanks a lot: -) import java.math. *; // The method used to calculate Ramanujan Pi public class main {// a1-4) is the constant constant used in the calculation of the side is the personal static last big decimilium A1 = new budicidal (9810); Private static final abiotic A2 = new budicidal (1103); Private Static Finals BigDecell A3 = New BigDial (26390.0); Private Stable Last BigDec A4 = New BigDial (396.0); // con1 2sqrt (2) is the exact reflexion of the private static final BigDQmail con1 = BigDecimal.valueOf (2 * Math.pow (2, -1)); With the increase in the size of // var loops, the PI personal static final leads to more precise production of BigDecular Loops = new BigDec (2); // Asum = 1 / pi later private static BigDecimal asum in the program; // fouri = 4 ... this private static BigDecimal charve

javascript - Unable to evaluate math expressions using Mathos Math Prser -

I am using to evaluate math expressions. I am trying to parse the following expression, but it throws the FormatException - Input string not in the correct format. Mathos.Parser.MathParser parser = new Mathos.Parser.MathParser (); String expression = "mathpaw ((4), (5))"; // or "Math.sqrt (1)"; String result = parser. Purse (expression); ostring (); In my app, I am using the math editor, which gives me the math. Using this math I am parsing it for plain math expression using javascript and then sending this expression to evaluate my C # code. What's wrong with my expression? Note: Due to certain conditions I am not evaluating math expression in JavaScript. The reason for this does not work because the pow Is defined as. The code below should work: Mathos. Parser Mathpresar parser = new mathos. Parser MathPerson (); String expression = "pau (4,5)"; String result = parser. Purse (expression); ostring (); // or string expression =

java - How to create an array list of an array -

सरणी की सरणी सूची को कैसे कार्यान्वित करें मेरा कोड: ArrayList & lt; arrays & gt; S = नया ArrayList & lt; Arrays & gt; (); Int [] ए = नया इंट [एन]; के लिए (इंट आई = 0; आई & lt; n; i ++) ए [i] = इन.एनएक्सआईटी (); s.add (ए); // मुझे एक त्रुटि int x = s.get (0) [1] // एक एरे ए का पहला तत्व प्राप्त करने दे। इसे पसंद करें: सूची & lt; int [] & gt; सूची = नया ArrayList & lt; int [] & gt; (); जब आप प्राप्त करें () ऑपरेशन करते हैं, तो याद रखें कि आपको एक पूर्णांक सरणी मिलेगी और कोई पूर्णांक नहीं होगा। उपयोग: सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {सूची & lt; int [] & gt; सूची = नया अर्रेलिस्ट & lt; int [] & gt; (); Int [] arr = {1,2,3}; list.add (आगमन); Println (list.get (0) [1]); } एक और दृष्टिकोण का उपयोग करना है: arrays.asList () । यह एक तत्व के साथ एक लगभग अपरिवर्तनीय सूची लौटाएगा जो एक सरणी है। आपकी समस्या: एरेज़ एक सहायक वर्ग है जो सरणी के संचालन का समर्थन करता है डेटा संरचना। इसलिए, मूलतः, आपक

r - how can i take out the first two rows of each subject ID -

I have data that looks like I can take data from the first two rows of each subject ID I want to reduce How can I do this for all people? Understanding ID time 1 0 1 1 5 5 1 7 11 2 0 0.5 2 1 10 2 2 15 Thanks in advance! You can: library (dplyr) library ( Tidyr) Df% & gt;% group_by (id)% & gt;% piece (1: 2) # id time CONC # 1 1 0 1.0 # 2 1 5 5.0 # 3 2 0 0.5 # 4 2 1 10.0 or data.table library (data.table) setDT (df) [, SD [1: 2], = ID From] # id time CONC # 1: 1 0 1.0 # 2: 1 5 5.0 # 3: 2 0 0.5 # 4: 2 1 10.0 or < Code> set DT (DF) [DF [, I Using [1: 2], id = $ 1], or base r df [with ( DF, AEE (seq_along (ID), ID, FUN = seq_along) <3),] #from @ John's comments In this case, you reduce the code given above ( id is not a factor variable. df [with (df, ave (id, id, fune = seq_along) & Lt; 3),] data df <- structure (list (id = c (1l), 1l, 1 L, 2L, 2L, 2L), time = C (0L, 5L, 7L, 0L, 1L, 2L), CONC = c (1, 5, 11, 0

Compilation in JSP -

During the compilation of a JSP file, it will be converted to a .java file for the first time. Loaded by the container to request I want to know where the container has changed. Class file If you are using Tomcat, then this task The directory will be: working in the template catalina localhost webappName / context java package directory xyz.java

amazon web services - DecisionTaskTimedOut when @Asynchronous annotation is used -

I have some two set actions that need to be executed in parallel. After successful completion, I want to execute another set of activity. I used Task and it was working. But, after using @ asynchronous annotation, I'm getting a decision turnout and no execution does not start its execution. As I AspectJ configuration is working and I can see the following sections in your goal: AsyncWorkflowImpl $ AjcClosure1.class AsyncWorkflowImpl $ AjcClosure3.class AsyncWorkflowImpl $ AjcClosure5 .class asynchronous version public class implements AsyncWorkflow {private AsyncActivitiesClient activitiesClient = new AsyncActivitiesClientImpl (AsyncWorkflowImpl); Private Async2 Actions Client Activities Client 2 = New Async2ActivitiesClientImpl (); @ Override public invalid executability () {promise & lt; Integer & gt; Intermediate = null; Promise & lt; Integer & gt; Intermediate reis 2 = faucet; (Int i = 0; I <5; i ++) {Intermediate = Examination Intermediate (

c++ - It says "No matching constructor for initialization of 'Fraction' -

। सीपीपी // // calculator.cpp // # इसमें शामिल "अंश" ज "# शामिल है & lt; iostream & gt; # से & lt में शामिल हैं, stdexcept & gt; नेमस्पेस एसटीडी का उपयोग करना; Int main () {अंश x, y; // त्रुटि यहाँ सही है यह कहते हैं, '' फ्रेक्चर 'चार ऑप्शन के आरम्भिकरण के लिए कोई मेल कन्स्ट्रक्टर नहीं है, प्रयास करें (cin & gt; & gt; x; cin & gt; & gt; ऑप; जबकि (cin & amp; amp; (op ==' + '|| op == '-')) {cin & gt; y; if (op == '+') x = x + y; और x = x - y; cin> gt; & gt; सेशन;} cout & lt; & lt; x & lt ; & Lt; endl;} पकड़ (अवैध_आगर्म & amp; ए) {cout & lt; & lt; "त्रुटि:" & lt; & lt; e.what () & lt; & lt; endl;}} एचटीएमएलएक्स (एफटीएनएलबी) और एसटीडीएलआईबी (एफटीएक्स) में शामिल हैं। एक्सचेंज क्लास डिफेंस क्लास फ्रेक्शन {सार्वजनिक: फ्रैक्चर (इंट ए, इंट बी); इंट फ्रैक्चर Int a, int b) शून्य सेट (int, int); int get_numerator (शून्य); int get_devenator

php - PayUMoney integration - How to calculate hash for comparing with response? -

हैश के लिए पोस्ट अनुरोध $ हैश स्यूवेन्स = "कुंजी | टीएक्सएनआईडी | राशि | उत्पादकेंद्र | प्रथमनाम | ईमेल | udf1 |" । "Udf2 | udf3 | udf4 | udf5 | udf6 | udf7 | udf8 | udf9 | udf10"; $ हैशवार्सएसईक = विस्फोट ('|', $ हैशस्यूएंस); $ हैश स्ट्रिंग = ''; विदेशी मुद्रा ($ हैशवर्ससेक $ हैश्वार के रूप में) {$ हैश स्ट्रिंग। = Isset ($ payobject ['params'] [$ हैश्वार])? $ पेऑब्जेक्ट ['पैराम्स'] [$ हैशवॉर]: ''; $ हैश स्ट्रिंग। = '|'; } $ हैश स्ट्रिंग = $ नमक; // हैश $ हैश = स्ट्रटोलर उत्पन्न करें (हैश ('sha512', $ हैश स्ट्रिंग)); सफल कोड प्राप्त करने के बाद हैश $ retHashSeq = $ salt। '|'। $ Status। '|| |||||| '$ udf3।।' | '$ udf2।।' | '$ udf1।।' | '। $ ईमेल।' ||| '$ राशि।।' | '$ txnid।।' | । '$ कुंजी; $ हैश = हैश ("sha512", $ retHashSeq); लेकिन उत्पन्न हैश वापस हैश से PayU सर्वर से मेल नहीं खाता है क्या समस्या हो सकती है??

Communication between Fortran and Matlab -

I am relatively new to communicate with different programming languages ​​and appreciate some help. Actually I have a fortran code and a metLab code. Both codes are initialized first and then have to be run sequentially. Each code needs input from the other when the process repeated repeatedly, then some convergence criteria have reached and the running is over. In order to make Fortran code more complex, not only does it require input from Matlab but also its own first walk. The same is true for Matlab, so as far as I can see that keeping both programs open during the open maintenance process is best because I have so many variables and therefore can not write them in other programs by writing them in a text file And can keep them safe. Next frequency Therefore, I am trying to do something like this: Initial convertible A, B, C and D Fortran: Input: A and B calculation ... Output: A (Variables now have new values) and D Matlab: Input: C and D calculation ... Output:

c# - How can I reuse a controller for multiple partial views? -

Dynamically select a partial view based on what I send to the controller, and manage it But I think I am A) It is more than complicated and B) How to get all the page links easily. Will be addressed in every turn if I make a mistake below, please note, it is from memory! All this works at home, I am after clarification whether there is any better way! First of all, what I have done: I have a controller: Private dictionary < Int, string & gt; PagesForFolder = New Dictionary & lt; Int, string & gt; () {... here I have my list of pages (index and pagename pairs)} Public ActionResult Test (int id = -1) {try {string pageName = ""; Var result = pagesForFolder.TryGetValue (id, name of page); If (result) string directory otherwise = "~ view / folder a / _" + page name + ".cshtml"; Return partial view (directory); } Hold (Exception Pre) {...} Return View (); } Then in the folder I see all my partial thoughts for that section of my websi

Jenkins: Best practices for backing up Jenkins home and archiving artifacts -

I have started using Jenkins for continuous integration. The requirement is that the construction environment of coverage and test results should be restored along with the construction of earlier constructions, if Jenkins sometimes fails to run for some time. Apart from this, back-up is expected to happen automatically. I could understand the functions of backup, thin back and periodic backup plugins. As I am new to Jenkins, I wanted to know What kinds of crashes are there in Jenkins? In case of failure, which files / configurations will be damaged What kind of back up will be efficient for my requirement? Any suggestion on best practice / suggestions to support Jenkins would be very helpful. Which kind of accidents are expected in Jenkins? / P> thanks In case of failure, which files / configuration damaged Will it be? What kind of back up will be efficient for my needs? I do not believe that accidents occurring specific to Jenkins are expected. Problems are

android - How to set incoming call priority -

Can someone tell me about the priority of the incoming call screen I developed an Android application In which I want to show my broadcast reciever instead of the default screen You General Broadcast Receiver Checking As discussed in the developer site they are two types of receivers Normal broadcast (sent with Context.sendBroadcast ) Are completely asynchronous All receivers of the broadcast are run in an undefined order, often at the same time. It is more efficient, but it means that the receivers can not use the result or may include the API. Ordered broadcast (sent with Context.sendOrderedBroadcast) is given to a receiver at a time. After each receiver is executed in return, it can promote the outcome of the next receiver, or cancel the broadcast completely so that it can not be passed to other receivers. Order receivers can be controlled with Android: the priority feature of the mailing intent-filter; Note : This is taken from the developer site above

jsf - PrimeFaces nested form inside p:dialog with appendTo="@(body) -

मेरे पास यह टुकड़ा है: & lt; h: form id = "form" & gt ; & Lt;! - अन्य सामग्री - & gt; & Lt; p: पैनल आईडी = "पैनल" हैडर = "परीक्षण" & gt; & Lt; p: इनपुट टेक्स्ट id = "input1" value = "# {viewScope.prop1}" आवश्यक = "सही" / & gt; & Lt; p: commandButton id = "button1" प्रक्रिया = "@ फॉर्म" अद्यतन = "@ फॉर्म @ विड्टव्वार (डायलॉग)" अपूर्ण "" पीएफ ('संवाद')। दिखाने () "मान =" ठीक "/ & gt; & Lt; / p: पैनल & ​​gt; & Lt;! - अन्य सामग्री - & gt; & Lt; / h: प्रपत्र & gt; & Lt; p: डायलॉग आईडी = "डायलॉग" हैडर = "डायलॉग" विजेट वैर = "डायलॉग" मोडल = "सच्चा" & gt; & Lt; h: फ़ॉर्म आईडी = "फॉर्म 2" & gt; & Lt; p: इनपुट टेक्स्ट id = "input2" value = "# {viewScope.prop1}" आवश्यक = "सही" / & gt; & Lt; p: कमान ब

java - How can I adjust this this function to FIFO & LRU? -

I'm having some trouble FIFO & amp; LRU , and I'm trying to change my code to those people. This is my default page: Fault method: Private zero PageFull (Int. Page number) {pageFaults ++; Try {pageFile.seek (page number • pages); For (int b = 0; b The method works perfectly, but I do not know how I would like it to be FIFA & amp; LRU, like this: Private Zero Page FaultFIFO (int page number); Private Zero Page FaultLRU (int page number); < Explains your FIFO and LRU understanding. FIFO : The operating system keeps track of all pages in memory in one line, with the most recent arrival on the back, and the oldest arrival in front. When a page needs to be changed, the front page of the queue (the oldest page) is chosen. While FIFA is cheap and intuitive, it performs poorly in practical applications. For example. If you have 10 shoes and your mother says that any 5 are garbage, then you will choose the oldest 5 to trash out. LRU : LRU works

ios - Sort an array of dates to extract every sundays -

I am quite new to iOS and I was wondering how to remove from an NSMutableArray as stars in the form of stars (in the form of wire) all that Sunday can be. From my research I have come to know that I have to start from today's date in this way NSDate * now = [NSDate date]; NSCalendar * Calendar = [[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar]; Then select "Like" on Sunday NSDateComponents * dateComponents = [Calendar component: NSWeekdayCalendarUnit | NSHourCalendarUnit From Date: Now]; NSInteger on weekdays = [dateComponents1]; // 1 is correct on Sunday? Then go back in the past and put every Sunday in a new array or in another place. NSDate * dateRelease; NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; [Dateformer settimezone: [nystimjon timezone wit: bb: @ "UTC"]]; [DateFormatter setDateFormat: @ "yyyy-MM-dd"]; (Ii) i date drawing]]; // Check here for Sunday if ([compare now: dateRelease] == NS

java.util.concurrent - Understanding java executor service shutdown and awaitTermination -

निम्न व्यवहार को स्पष्ट करने की आवश्यकता है मेरे पास java.util.concurrent.ExecutorService के साथ एक जावा ऐप है, के लिए (int i = 0; i & lt; धागा_ग्रेड; i ++) {रननबल वर्कर = नया मैथ्रेड (बैच सिज़); executor.execute (कार्यकर्ता); } Executor.shutdown (); निष्पादक। प्रवेश परीक्षा (15, टाइम यूनिट। एमआईएनयूटीईएस); System.out.println ("सभी धागे समाप्त हो गए हैं"); उपरोक्त कोड में मेरे पास 5 धागे हैं और ये 10 मिनट में समाप्त होते हैं और यह System.out.println ("सभी थ्रेड समाप्त हो चुके हैं") निष्पादित करेगा , यहां तक ​​कि हालांकि निष्पादक। इंतजार कर रहा है (15, टाइम यूनेट। एमआईएनटीईएस) 15 मिनट प्रतीक्षा समय है। लेकिन जब मैं executor.shutdown () को हटा देता हूं प्रोग्राम 15 मिनट का इंतजार करेगा जो कि अगले लाइन को निष्पादित करने से पहले निष्पादक.वाइटटिमिनेशन (15, टाइम यूनेट। एमआईएनटीईएस) स्टेटमेंट में निर्दिष्ट है। क्या कोई इस व्यवहार को समझा सकता है? बिना किसी शटडाउन कमान का समय निर्धारित राशि तक इंतजार करना चाहिए, हालांकि सभी धागे समाप्त हो गए हैं

javascript - Take the user name from the URL and redirect with a query string with that user name -

I want to execute a jquery script which takes any name after the slash "/" in the domain address and The default user with a query string with the user's username For example, if a user types Mydomain.com/username, I want to redirect the page to mydomain.com/default.aspx?name=username. How can I complete this? Thanks Solution I added the following code to the global code. Secure void Application_BeginRequest (Object Sender, EventArgs e) {Uri Yuri Address = New Uri (Request URL. AbsoluteURI); If (uriAdress.seagment! = Null and Yuri address.Segment.Langtie> 1 & amp; amp; String.ISNLLCTI (YuriAdder. [1]) {String User Name = Yuri Address Response.Redirect ("default .aspx? Name = "+ Segment User Name);}} URL here There is a complete solution against rewriting. Rewrite the text from there .. Blocking an incoming web request and requesting a different resource. Rune: The process of directing. When reconstructing the URL, the URL is usually r

javascript - onclick function is not working -

This is my code, anyone can help me Click the function on the onclick function insert1 ( ); Calling is not calling when clicking on Calling button If I use the script in the head part, then it also does not work. & lt; Html & gt; & Lt; Top & gt; & Lt ;? Php $ mode = ""; $ SNO = ""; $ Name = ""; $ Gender = ""; $ Age = ""; If (isset ($ _ request ["mode"])) $ mode = $ _ request ["mode"]; And $ mode = "list"; If ($ mode == "save") {$ sno = $ _ request ['sno']; $ Name = $ _ request ['name']; $ Gender = $ _ request ['gender']; $ Age = $ _ request ['age']; $ Con = mysqli_connect ("localhost", "root", "", "outpost"); Insert $ Sql ​​= "atom (name, gender, age) value ('$ name', '$ gender', '$ age')"; Mysqli_query ($ thief, $ sql); }? & Gt; & Lt; / Head & gt; &

c++11 - boost::multi_index_container erase function rehases? -

I have the following problem: I have a promotion: :: mult_index_container, here is a simplified definition of the TYPE an integral type boost :: multi_index: a member function indicator and type: m_id by m_id : multi_index_container & lt; TYPE *, Promotion: Multi_Index :: Index_Bine & lt; :: multi_index :: hashed_unique promote & lt; Boost :: multi_index :: tag & lt; By_hashed_id & gt;, boost :: mult_index :: member & lt; Type, const type, and type :: m_id & gt; & Gt; & Gt; & Gt; Map; When I delete an object in the following way: hashmap = map.index.get & quot; By_hashed_id & gt; () This = hishmap.fid (30); Erase it; /// Remove the underlying pointer hashmap.rase (this); Erase the /// map (the map is shown again (segfault) ()? are trying to touch it again the code seems to crash whenever Map , what no one knows is that this is normal behavior, it can be reborn a delete function before removing indicators, which wil

objective c - select data record in table sqlite ios return with only one object -

"itemprop =" text "> I have a problem when I return the selected username to include only one object and all of the table username that is how I solved this we have to try to select the database manager and find that I query SQL statement is correct - (NSMutableArray *) FindAccounts {/// database NSString * docsDir; NSArray * Direpath; // Documents Directory dirPaths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, Yes) Go; Doxdir = [डायपरपेट ऑब्जेक्टऐंडएक्स: 0]; // Create database path of the database file DatabasePath = [[NSString alloc] initWithString: [docsDir stringByAppendingPathComponent: @ "TRIAL.sqlite"]]; NSFileManager * filemgr = [NSFileManager defaultManager]; Sqlite3_stmt * statement; Const char * dbpath = [databasePath UTF8String]; If (sqlite3_open (dbpath, & amp; contactDB) == SQLITE_OK) {NSString * querySQL = [NSString stringWithFormat: @ "USERNAME, select the type" CONTNEW]; Const char * quer

python - How can I remove a variable that contains a string? -

This is my program that I am writing for a school project. In the previous other functions, you can see that I am trying to delete the previous pizza order because the user has made a typo, however, provides a simple - = one type error: - =: 'str' and 'str The unsupported opaque type (s) provides for it is writing anything except my first scratch (: P) so that a help would be appreciated. "BBQ chicken and bacon \ n", "apricot chicken \ n \", "super sweeten \ n", "meat lover \ n", "BBQ chicken and bacon \ adjacent chicken \ n "," pepperoni Feast \ n ", \" Beef Italiano \ n "," seafood deluxe \ n "" BBQ Hawaiian \ n ", \" pepperoni lover \ n \ "," wedge Supreme \ n ", "Thieves of cheese \ n", "Beef Hot \ Spicy \ n", "Roma \ n", "Hawaiian \ N", "Vegetarian Cheese \ n", "Vegan Hot" Spicy \ n "," W

pdf generation - Grouping rectangles in iTextSharp -

I have several rectangles and all share the same color. Is there a way to merge / group them into a vector object, then the size of the generated PDF is small? If you are making a document with scratch, the answer is trivial: Yes! It is enough to attract all the paths of the rectangle that share the color of the same place and then fills the operator, strokes or fills & amp; Path stroke If you are talking about optimizing an existing PDF document, then you are coming for some heavy programming. You will need to parse every content stream in search of rectangle operators (assuming that the rectangles do not move through move-to and line-to operator), fill these shapes and / or check in strokes, and then these Reorder all operators. It would have been a lot of thought that I would know where it started, but I can not predict where it will end. It will probably be known that this form means more important to define a single rectangle as XObject and to reuse a single exter

php - drupal 7 How can I get cron jobs to run automatically -

I have installed the Alicia Cron module and have setup the cron job. So far I'm running cron jobs mannually. And it takes a lot of time because I have more than just running a cron every 2 hours. I read the handbook on cron configuration, but there was not enough, because I am not a PHP literacy person. How can I automatically do my Duplicate Run Cron ??? So that I do not have to come back to my site every 2 hours. You can use crontab. Generally it can be accessed on your server by running crontab -e in person on your server and then adding an entry to specify to update your site. For example, 0 * * * * wget -O - -q -t 1 http: // {your_drupal_server} /cron.php Go to {your_drupal_server} with your server's URL every hour. Crop on the wiki page - - Drupal's page for the installation of the crossstab

php - Symfony2 DATEDIFF function -

I need to fill the table in the table with data from the database. Everything is OK with the exception of: I have a column with the DATEDIFF property to get the number of days. TODAY-dateFromDateBase The question is: How to get the number of days in a loop in a twig? Here's my sprig: & lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Form action = "" method = "post" {{form_enctype (searchform)}} class = "form-index-permit" & gt; & Lt; Td> Lp & lt; / Td> & Lt; Td> ID PRZEPUSTKI {{form_widget (searchform.PermitId)}} & lt; / Td> & Lt; Td> Name {{form_widget (searchform.Permitname)}} & lt; / Td> & Lt; Td> Surname {{form_widget (searchform.Permitsurname)}} & lt; / Td> & Lt; Td> Company {{form_widget (searchform.Company)}} & lt; / Td> & Lt; Td> GW {{form_widget (Search Format Contractor)}} & Lt; Td> Debithe {{form_wi

java - Create class with javassist and make it available -

मैं निम्न कार्य करना चाहता हूं: try {class.forName ("MyClass" ); } पकड़ (क्लासनोटफौन्डई एक्सप्शन ई) {क्लासपूल पूल = क्लासपूल.गेट डीफॉल्ट (); CtClass cc = pool.makeClass ("MyClass"); Class.forName ( "MyClass"); } मैंने इसे करने की कोशिश की है, लेकिन यह हमेशा से काम करने में प्रतीत नहीं होता ... यह एक संदर्भ में काम करता है, लेकिन दूसरे में एक ही कोड दूसरे "कक्षा" पर दुर्घटनाग्रस्त हो रहा है। ForName ("MyClass") "... कॉलिंग cc.toClass () हमेशा सही वर्ग लाता है, और कोशिश की है cc.writeFile () लेकिन इसमें कोई फर्क नहीं पड़ता। किसी तरह, कुछ मामलों में द्वितीय श्रेणी। ForName वर्ग पाता है, और अन्य मामलों में यह सिर्फ टूटता है ... क्या मुझे कुछ याद आ रहा है? मुझे पता चला कि मेरा कोड विभिन्न क्लासलोडरों पर क्लास बना रहा था, जहां पर मैं इसे कॉल कर रहा था। मैंने निम्न कार्य करके यह हल किया: कोशिश {class.forName ("MyClass"); } पकड़ (क्लासनोटफौन्डई एक्सप्शन ई) {क्लासपूल पूल = क्लासपूल.गेट डीफॉल्ट (); CtClass cc

javascript - Wrap an element in MooTools with custom class -

Mootools में, क्या यह निम्नलिखित करना संभव है: var MyClass = new class ({प्रारंभ: फ़ंक्शन (एल) {this.element = document.id (el);}}); Console.log (उदाहरण (document.id ('test-div'), एलिमेंट); // logs: 'true' var instance = new MyClass ('test-div'); console.log (instanceOf (उदाहरण, MyClass) ; // अपेक्षित परिणाम: 'सच' console.log (उदाहरण (दस्तावेज़ .id ('test-div'), MyClass); // अपेक्षित परिणाम: 'सच्चा' अन्य में शब्दों, यदि मेरी कक्षा किसी तत्व पर तत्काल बोलती है, तो उसे "एलिमेंट" के बजाय "मायक्लास" वापस करना चाहिए

server - hapi js catbox caching -

I'm coding for about 6 weeks so I'm new to this world. My current task is to write cache and to store the data. I used the catbox to start this process, I was wondering how this console It is serving to check; So I was thinking about creating a server to keep cached data. Do I bend the wrong tree? As for entering my cache, which tree should I bark? Many thanks in advance

How to assign order to elements in a column in R? -

निम्न डेटासेट में: दिन का स्थान नाम 22 XA 22 XA 22 XB 22 XA मैं आर: का उपयोग करके निम्न क्रम में वैरिएबल नाम को संख्या को कैसे निर्दिष्ट कर सकता हूँ? 22 XA 1 22 XA 1 22 XB 2 22 XA 1 22 YC 1 22 YC 1 22 YD 2 23 XB 1 23 XA 2 संक्षेप में, मुझे नाम के अनुसार नामों की आवश्यकता है एक निश्चित दिन और एक निश्चित जगह पर होने का उनका आदेश। आधार कोड में Tapply : dat $ संख्या & lt; - सूची (tapply ($ $ नाम, पेस्ट ($ $ दिन, $ $ स्थान), FUN = function (x) {y & lt ;- जैसा.चार्टर (एक्स) As.integer (कारक (y, स्तर = अद्वितीय (y))}})) # दिन स्थान का नाम संख्या # 1 22 एक्सए 1 # 2 22 एक्सए 1 # 3 22 एक्सबी 2 # 4 22 वाईसी 1 # 5 22 वाईसी 1 # 6 22 YD 2 # 7 23 XB 1 # 8 23 XA 2 विचार tapply का उपयोग करके दिन और स्थान के आधार पर समूह प्रत्येक समूह के लिए, स्तरों की इसी क्रम को संरक्षित करने वाले कारक को नाम दें। अंतिम परिणाम प्राप्त करने के लिए बनाए गए कारक को पूर्णांक में रखिए। data.table (शर्करा सिंटेक्स) का उपयोग कर: लाइब्रेरी (डेटा के लिए योग्य) setDT (dat) [, संख्

java - : ORA-01722: invalid number error in JSTL query -

Friends I am working on jsp and servlets and web application in oacle SQL developer .. in myjsp.jsp I have a List list & lt; String & gt; Sex list = (list & lt; string & gt;) request.getAttribute ("sex list"); & Gt%; and put it in the combo box in the JSTL tag like this and I & lt; Sql: query data source = "$ {dbcon}" var = "result" & gt; Choose first name, last name from members where sex =? & Lt; Sql: Ultimate value = "$ {gender}" & gt; & Lt; / Sql: Ultimate & gt; And in my database there is gender number (0,1) .. So no help to avoid error ??

c++ - GLUT keyboard and mouse func just won't get called -

आंत मुख्य (int argc, const char * argv []) {glutInit (& amp; argc, const_cast & lt; char ** & gt; (argv)); GlutInitDisplayMode (GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA); GlutInitWindowPosition (100, 100); GlutInitWindowSize (640, 480); GlutCreateWindow ("नमूना विंडो"); glutDisplayFunc (प्रस्तुत करना); glutMainLoop (); वापसी 0; } शून्य कुंजीपटल (अहस्ताक्षरित चार ग, int x, int y) {std :: cout & lt; & lt; "कॉल किया गया कीबोर्ड"; अगर (सी == 'ए') {exit (0); }} शून्य माउस (इंट बटन, इंट स्टेट, इंट एक्स, इंट y) {std :: cout & lt; & lt; "कॉलेड माउस"; अगर (बटन == GLUT_RIGHT_BUTTON) {exit (0); }} शून्य रेंडर () {} तो, मुझे ऊपर कोड के साथ समस्या है। कीबोर्ड और माउस फ़ंक्शन को सिर्फ कॉल नहीं किया जाएगा। मुझे आशा है कि आप इस समस्या को पुन: उत्पन्न करने का प्रबंधन कर सकते हैं। सरल, आप glutKeyboardFunc और glutMouseFunc : int main (int argc, Const char * argv []) {glutInit (और argc, const_cast & lt; चार ** & gt;

r - save output in data.frame for if-else statement -

I try to create a function (which will later be used to work with shiny R) At the moment I fail to store results from my function in the data frame. So far I have created the following code: f_expccm I hope to receive an output data with the following entries: [1] -500 [1] 855 [1] 738.40 9 1 [6] 637.7169 [1] 550.7555 [1] 475.6525 But I am only able to get it if I Add print function (which does not save results from my knowledge ...): Any help will be greatly appreciated !!! Best regards, Is this the behavior you are looking for? F_expccm

c - capitalize first letter in file -

I am trying to capitalize the first letter The character is read from the text file Unfortunately, I can not read an idea that says two boolean variables, which can be of type int: a variable 1, when the current character is a word of a word The other part will hold the variable 1 when the last letter is a part of a word. But, how can I know whether the four words are part or not? #include & lt; Stdio.h & gt; Zero CPTP (four x []); Int main () {cptlz ("in.txt"); Return 0; } Void cptlz (char x []) {char ch; Int present, pastoral, cents = 1; File * fptr_in; If ((fptr_in = fopen (x, "r")) == faucet {printf ("Error reading file \ n"); } And {while (cents == 1) {st = fscanf (fptr_in, "% c", & amp; ch); If (ch> = 'a' & amp;;; & lt; = 'z') {printf ("% c", ch-32); } And printf ("% c", ch); Just try this code. void cptlz (char x []) {char ch; Int current, previous thing = '\ n

opencv - Visual Studio 2013 Solution Properties -

Hello I am using Open CV Image Processing Tools with Visual Studio 2013 and I added the necessary library and paths for my solution and created a project. In that solution, however, when I want to make another project in that solution with the same solution (library etc.), then they are not added. I do not really understand why I am not making a new solution, but I just make a new project in the same project. Do I have to manually add all these libraries again? Or is there an easy way to do this? Besides, using the same priorities in a single solution would not be much better and easier? Is not this the only purpose for a new solution? How can I fix this problem?

javascript - Using dynamic value in JSON -

I have a json file (myJson.json) in which I'm adding a dynamic value < Code> [["Menu": " Now I use this JSON in my Php file as I am doing: $ r = "HOME"; $ Str_data = file_get_contents ("MyJson.json"); $ Data = json_decode ($ str_data, true); Var_dump ($ data [0] ['menu']); Output: " & lt ;? php echo $ r ?? & gt; " What is a "home" output? You can type [{{{"{{{" {{{"menu": "R ",}] and JSON $ r =" HOME "; Var_dump ($$ data [0] ['menu']); You will find the home as the output

c# - Binding a decimal value with InvariantCulture -

I have a textbox which is linked to the decimal property. In our requirment the behavior is invention welfare . When a user type is 6.30 , the value should be 6,30 if a user type 6,30 , the value should be 6,30 , currently bindings text "> Your requirement is not really in the behavior of InvariantCulture . To allow typing in both types of numbers, either . or public class multicore counters: IValueConverter {public object convert (object value) Type Type, Object Parameter, System Globalization. Culture Information Culture) {var ci = System.Globalization.CultureInfo System.Globalization.Culture Information.Ci.NumberFormat.NumberDecimalSeparator = ",";; Compensate ((decimal) value). String (ci); } Public Object Convertback (Type Object Value, Type Type, Object Parameter, System Globilization. Culture Information Culture) {var ci = System.Globalization.CultureInfo.InvariantCulture.Clone () As a system. Globalization.CultureInfo; Var s =

python 2.7 - Matching Numpy and NetCDF4 indexing when creating a netCDF file -

I am trying to move values ​​from a NETIDER array to a NetCDF file, which I am making. Currently, I am trying to find the best way to imitate the 'fancy indexing' of Naxalite array while creating netdf file, but two indexing systems do not match when there are only two digits in the dataset. netcodef4 import np rootgrp = netCDF4.Dataset ('Test.nc', 'w', format = 'NETCDF4') time = rootgrp.createDimension ('time', none ) Dim1 = rootgrp.createDimension ('dim1', 100) dim2 = rootgrp.createDimension ('dim2', 100) dim3 = rootgrp.createDimension ('dim3', 100) ncVar = rootgrp.createVariable ('ncVar', 'f4' , ('Time', 'dim1', 'dim2', 'dim3')) npArr = np.arange (0, 10000) npArr = np.reshape (npArr, (100100)) < P> Then it works fine: x, y = np.array (([1,75,10,99], [40,88,19,2])) NCVR [0, x, y, 0] = NpArr [x, y] although it is not: x, y = np.array ( ([1,75], [40, 88

Using Access 2010 VBA list all open Excel Workbooks -

OK, I should be missing something subtle here. This VBA works in Excel 2010: Private Everything Extett () debug for each wb in workbooks as a WWB workbook. Print wb.Name Next wb end sub I'm trying to replicate this entry in VBA and I have not had any success of the following methods in Access 2010. Private AccessEstTeT1 () 'http://stackoverflow.com/questions/15958061/controlling-schel-' Workbook-to-Access-2010-VBA Driven xlApp Excel.Application Dim xlWB Excel.orkbook set for each xlwb as xlApp = New Excel.Application form Excel.Workbooks Debug.Print xlWB.Name Next nothing happens in xlWB. Stepping through 'and moving:' XLAPP = "MicroSoft Excel" 'XLWB =' Nothing 'XLVB is not set with name = object variable or block block. 'But do not put an error End Sub access to private sub AccessTest2 () objects- VBA dim xlApp Excel.Application as Dim West Bengal Excel' http://stackoverflow.com/questions/5729195/how-to Derived from -ref

c++ - Qt : reference to non-static member function must be called -

I am new to Qt, and today I have to code my code from QFuture To run the tasks. I have a way that changes the saturation value of QImage , which gives QPixmap objects to my QGraphicsView To pull on It does not work well to use all threads, but obviously it is very intense on the main thread, so I want to move it. I read some articles about threading in QT, and found that supports V5, it seemed to be perfect for the case of my use, as I thought I had my work down As a snippet I can send it to a new thread: zero main window :: on_slideSaturation_valueChanged (int value) {QFuture & lt; QPixmap & gt; Future = QtConcurrent :: Run (slider-> Modify edit, value, image); Future.waitForFinished (); Image = future.result (); RenderImageToCanvas (); Modified = true; } However, I should call the reference to the non-static member function . This error is calling from my sliders class, I know that I have not declared the method as a static, but when I make it a whole

How to restore corrupted database file in mysql -

I have formatted my system (C) in which my database files have unfortunately lost my database backups. I retrieve my database files as the dump files. When I tried to restore my display error to my dump file as mentioned below, 18:00:34 restore e: \ pos1.sql Running: mysql.exe --default-file = "c: \ users \ ashfaq \ appdata \ local \ temp \ tmpdi5lll.cnf" - host = localhost --user = root - Port = 3306 - default-character-set = UTF8 - comments & lt; "E: \ pos1.sql" error: ASCII has appeared in the '\ 0' statement, but unless the option -bene-mode is enabled and mysql is run in non-interactive mode, it is not allowed is. Set - binaries-mode 1 if ASCII '\ 0' is expected. Query: ''. Operation failed exitcode 1 18:00:36 E: \ pos1.sql has ended with 1 errors Any help would be appreciated ... < / P>

vb.net - Passing Parameters from one view model to another in wpf -

I continue to adapt to the new world of WPF and MVVM I myself another problem which is a Vexing seems to be small with proven. If I need a new form to take a parameter, then I have just passed the information required for the constructor of that form. Winforms is essentially a code behind the model anyway as it was not an issue. Now I find myself with the control by a MainWindow (MainWindowViewModel) and English (controlled by LoginViewModel) which is shown as the first one dialog. I have resolved the issues of the missed dialogue and I can get the main window to show after locking the login dialog The login dialog has been shown and the application with the following code in the startup Has responded to. Dim dlg new login dlg.ShowDialog () = then as it ended the truth Otherwise Current.Shutdown (0) is And I use the following to take care of showing the main window when the login window is closed; in the code behind the login window; Public sub new 'This caller i

osx - mysql key length limit on Mac OS -

Why does mysql do not let me create tables with a primary 767-sized key column on OSX? This works fine on Ubuntu. I am running mysql 5.6. What table engine are you using? 767 bytes is the maximum length for the primary key in the InDebby table. 1000 bytes is maximum for the Machim Engine. > Perhaps you are using the InnoDB engine in your OSX MySQL

css3 - CSS: Select every 2nd child but not every 4th -

I have to select every 2 children of an element, but if it is 4 (4, 8, 12 ..) its Should not be selected. So what I want [2, 6, 10, 14] "respectively" My current solution is: p: nth-child (2n) {background: purple; } P: nth-child (4n) {background: white; } Now the color of the purple background is in 2, 6, 10th and 14th elements. But this is not a great way to solve the problem. Can I add these two selectors in some way? p: nth-child (2n \ 4n) {// just an idea that this selector How the background can work: purple; } This should work for your sequence ([2, 6, 10, 14].): p: nth-child (4n-2) {background: purple; } p: nth-child (4n-2) {background: purple; Color: #fff; } & lt; P & gt; Homepage 1 and & lt; / P & gt; & Lt; P & gt; Ad 2 & lt; / P & gt; & Lt; P & gt; Homepage 3 & lt; / P & gt; & Lt; P & gt; Website 4 & lt; / P & gt; & Lt; P & gt; Ad 5 & lt; / P & gt; & Lt;

Significance of return keyword in javascript -

I am new to javascript, if the question seems silly, ignore it. What is the importance of the return keyword in the code of the third last line when we can cancel it? function showName (first name, last name) {var nameIntro = "Your name is"; The function is doing the same thing, even if I can leave the "return" here (the name of the first name + + + + + + last name);} In your example, you should return return is not required because your function does not produce an object or value, it only does something (this gives the string warning) Suppose, however, that you name the intro You want to save the value of the string and use it later. Your function can be modified to return the value, which can be saved as a variable, the following code will give the same result, but the return is used: function showName (first name, last name) {var nameIntro = "your name is"; function makefinalname () {return name interna + firstname + " "+

java - replaceAll() not working as expected and passing value outside a helper thread to main thread -

दो समस्या: हल किया गया एक और विशेष वर्ण के साथ प्रतिस्थापित $ @ और यह समस्या हल हो गई समस्या 1 मेरे पास एक वैरिएबल स्ट्रिंग स्ट्र्वार है, जिसमें नीचे टेक्स्ट है (जो इसे किसी फ़ाइल से पढ़ चुका है)। अब मैं ग्रंथों को बदलने के लिए replaceAll () का उपयोग करने की कोशिश कर रहा हूं (जैसे $ pixeltrackers $ के साथ "sampletext" ), लेकिन यह विशेष रूप से इसकी जगह नहीं है स्ट्रिंग बिल्कुल, उद्धरण और रिक्त स्थान आदि के कारण हो सकता है। संभव समाधान क्या हो सकता है? & lt; html & gt; & Lt; शीर्ष & gt; $ पिक्सेलट्रैकर $ & lt; / head & gt; & LT; बॉडी & gt; & Lt; div & gt; & Lt; a href = "$ clickurl $" & gt; & lt; img src = "$ iconurl $" / & gt; & lt; / a & gt; & lt; h1 & gt; $ हेडलाइनटाइट $ & lt; / h1 & gt; & Lt; / div & gt; & Lt; div & gt; & LT; h2 & gt; $ descriptiontext $ & lt; / h2 & gt; & Lt; / div & gt; & Lt; div & gt; &am

sql server 2012 - Sql query alteration -

I want this query to work with my table and not just sample data Declare the @date variable (8) = '20141013'; With CT (SELECT * FROM) - use your table name instead of values ​​(VALUES ('09: 00: 00', '12:30:00', '7-3', '20140 919' ), ('15:00:00', '17:00:00', '7-2', '20141013'), ('14: 00: 00 ', '16: 00: 00', '7- 3 ',' 20140919 ')) x (EventStart, EventEnd, Rooms, DayStarts)), as cte_Days_Rooms - and specify a day to compare a carti product with all the rooms as well as start and end time ( Select y.EventStart, Y. From EventEnd, x.rooms, (select @date DayStarts) Include a cross.DayStarts (select a separate room from CTE) x CROSS JOIN (choice '09: 00: 00 'EventStart, '09: 00: 00' EventEnd Unions All Selection '22: 00: 00' EventStart, '22: 00: 00' EventEnd) y), as cte_1 - A "Base Data "Merge Original Data (Choose from CTE * Where DayStarts =

datagrid - Visual FoxPro 9 Grid: how to simulate down arrow with a barcode reader -

I have a grid in Visual FoxPro where my client will use the Motorola CSE 3000 series barcode reader. The problem is the grid, if you simulate the entry key (chr (13)), then going to the next field on the same line and not creating a new line. The only way is the press Do you have any ideas? Do you have any ideas? Do you have any ideas? / P> Thank you. I understand with the barcode reader that enter one but not a single keyboard command (DNARROW), is it ? So that the solution should choose the key pressed from the form, I organize the "keypress" form in that item, in that event you can insert the code to leave the next record.

logging - Python / How to get logger with absolute path? -

I try to use Python logging: import logging log = Logging.getlogger (__name__) logInstall = logging.getLogger ('/ var / log / install.log') log.info ("Everything works great") logInstall.info ("Why is not the log file hidden?" ) In the log's log file, everything works and prints: "Everything works great" but / var /log/install.log , I do not see anything. What do I do? Where have you seen that the logic for logging.getLogger () The file path was ??? This is just a name for your logger object: logging.getLogger ([name]) Return a logger with the specified name or, if no name was specified If returned, a logger who is the root logger of the hierarchy is specified, then the name is usually a hierarchical name different from the dot like "a", "ab" or "abcd". The selection of these names is completely dependent on the developer who is entering. Where / how this logger logs (file, stderr, s

c++ - why vector does not updates in loop? -

I want to update the vector 'v' so that I can repeat count from 0-100. I know that this is not allowed, but what if I only want to do this? Is there any way? int main () {// your code here vector and lieutenant; Int & gt; V; V.push_back (1); Int count = 0; (INM: v) {if (count> 100) v.push_back (count); Count ++; } (ATM: v) COAT & LT; & Lt; Elem & lt; & Lt; Endl; Return 0; } Output is: 1 As you can see from border-based for loops, end_expr is not updated between iterations so you only have one running push_back Invalid v.end () (which is described in the end_expr as linked page), so you actually have undefined behavior. The easiest way to fill the vector with 0.01 will be: vector & lt; Int & gt; V (101); Std :: iota (v.begin (), v.end (), 0);

c++ - QStateMachine with RestoreProperty is losing property on transition -

The QT document for state machines uses two principles: I The first properties allow one to provide QState, the other to trigger events in only one specific situation. When I add both functions, restoring properties is no longer working. When a QSignalTransition is removed, properties are set to their initial values ​​(before the state machine is started), even if the current situation is not left. I have a small example to reproduce it: #include & lt; QApplication & gt; # Include & lt; QWidget & gt; # Include & lt; QPushButton & gt; # Include & lt; QVBoxLayout & gt; # Include & lt; QStateMachine & gt; # Include & lt; QSignalTransition & gt; Int main (int argc, char * argv []) {Q Application A (argc, argv); QWidget * w = new QWidget; QStateMachine * machine = new QStateMachine (w); QState * s1 = new QState; QState * s2 = new QState; QVBoxLayout * layout = new QVBoxLayout (w); QPushButton * btnState = new QPushButton ("No

zipcode - Stripe iOS integration - How to add zip code to PTKView -

I am fully able to integrate the stripe with your iOS code Pitikeviyu shows that the card number, expiration month / Year, cvv number In PTKView, I do not see zip code text area, but I can see addressZip property. Is it possible to capture zip code with viewing the iOS stripe? Thanks in advance. It seems that, know that UI component to PTKView out-of-the-box Is (yet). However, they give the PTKAddressZip type to verify that the signed zip code is valid or not. I have created my own zip field, which looks like a credit card field using the supplied "textField.png" image that comes with a payment pest. This is both Objective-C and Swift examples here ... Objective-C: UITextField * zipTextField; ZipTextField = [[UITextField alloc] initWithFrame: CGRectMake (15,170,290,55)]; ZipTextField.keyboardType = UIKeyboardTypeNumberPad; ZipTextField.placeholder = @ "" ZIP Code "; // Left padding UIView * paddingView = [[UIView alloc] initWithFrame: CGRe