Posts

Showing posts from September, 2012

ios - Can I update cookies in the configuration of a NSURLSession after its creation? -

Can I update cookies in the configuration of an NSURL session after the session is created? This code is used to update cookies I use but it does not seem to work self.session = [NSURL session with session configuration : Confidential Representative: Self-representative Qu: zero]; Self.session.configuration.HTTPShouldSetCookies = No; Self.session.configuration.HTTPCookieAcceptPolicy = NSHTTPCookieAcceptPolicyAlways; Self.session.configuration.HTTPAdditionalHeaders = [NSHTPPQ RequestHeaderFieldSwit Cookies: CookiesAre]; Thanks, No, you can not do apple docs To create a configuration before creating a session from: It is important to configure your NSURLSessionConfiguration object before using it to initialize the session object. Session objects create a copy of the configuration settings you provide and use those settings to configure the session. Once configured, the session object ignores any changes you make that you do in the NSURLSessionConfiguration object. If ...

php - $_SESSION variable rewritten -

I have a very strange behavior with session variables of php. The problem is that the session For example, the example of the code snippet is something like this: & lt ;? Php session_start (); $ _SESSION ["id"] = 5; Echo $ _SESSION ["id"]; // echos5 $ id = $ _REQUEST ["id"]; // $ _REQUEST ["id"] = 3 for example $ _SESSION ["id"]; // Echos 3? & Gt; Can it be configured incorrectly? PS: Running PHP version 5.3.3 You may have register_globals is set to your php.ini configuration. This means that you can use the $ _ session ['id'] in the context of the variable $ id , which you are looking for in the example above Are there. To close in php.ini, set register_globals and try again.

visual studio 2010 - adding multiple wcf service references in the same name space -

I have 8 wcf services, when I add them to Visual Studio, they have to be in the same namespace. I tried service references -> Add service context but each one has made its name space Please tell me that you need more information! Thank you! You can not control the namespace from the Visual Studio, however you can bypass the proxy / service You can use wsdl.exe to generate the reference: Use the namespace parameter to generate in the specific namespace: / n [ampspace]: Namespace Specifies namespace for proxy or template generated. The default namespace is the global namespace. When using the / parameter option, this is the value element and has a string in it. This element should be in the parameter file.

uilocalnotification - Need Alternation of reisterUserNotificationSettings for iOS Version less than 8.0 -

For iOS version 8.0, code is required to register UserNotificationSettings in my app I Uses the following for iOS 8.0: [[UIApplication ShareApp] Register User Notification Settings: [UIUserNotificationSettings settingsForTypes: UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound Categories: Zero]]; Please help me You have to check that Does the app include that method (selector). (If the application responds to SIL: @selector (registerUserNotificationSettings :)) {[Application Register User Notification Settings: [UIUserNotificationSettings SettingsForTypes: (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert) Categories: Zero] ]; }

winforms - splitting C++/CLI code between .h and .cpp file -

Is it possible to separate the form class code between .h and .cpp files in C ++ / CLI such as we When I do this, I get a parse error in Designer View Regards, Rohini Yes you can. Put the method in the header, for example Constructor and Distinctor: Form 1 (zero); ~ Form1 (); Create and .cpp file or just edit an existing one: include "formName.h" (do not forget to forget names), next: Form 1 :: Form 1 (zero) {// ...} Form 1 :: ~ Form 1 () {// ...} Load the event (click, load, etc.) for the event, define the method in the header and keep the implementation in the source file. .h: System :: Zero Button Object ^ Sender, System :: EventArgs ^ E); . Cpp: Zero Button (Object ^ Sender, Event Arguments ^ E) {Message Box :: Show ("Hello, World!"); }

asp.net - better performance for aspx page -

Image
When I look in my website firebug (Net tab), the aspx pages are too long to load. How can this reduce the load time? . This page is just a text and image and has a little DB query in it. This is my code: Select public function as pharao () datatyale) Try As String Slow query = "Tbl_News from Top 10 * where NewsConfirm = 'right' by New Zealand DESC '' Use SQLX as new SQL Connection (connection string) as DM SQL ADAPTER New SQL DataAdapter (Query, SDLCon) New Data As Demat DT L () SQLAdapter.phill (DT) Return DT Exchange for X and End and Function and get data in repeater

java - Hadoop: passing data between consecutive mapreduce tasks -

I have macarized jobs in the following ways: map1 -> less 1 -> map 2 -> less 2 during map1 As a side step effect, I only calculate the required data during phase 2, so I do not want to pass it completely from the series What is the best way to pass this data, so that at least 2 steps But can I get data from Map 2 and Map 1? Thanks Depending on your comments, A and b . Then, to go to the 2Redgers to go to A reducer 1 and b , with the output of the mapper. The best option I can see is to: JOB 1: A to differentiate b , Use MultipleOutputs in the first job ... Use a normal prefix (for example in the values) type B the intermediate output of Mapper 1, which they A will be different from the output in Reducer 1, when you see the prefix, delete it and type b s into the b output path. Job 2: Use multiple input in your second job Use Mapper 2 for input which this process does And an IdentityMapper for b will only forward it to spread again B...

java - Play Framework 2.3.4 - How to call Results.badRequest() on a POST request and direct to method in controller not mapped by routes? -

OK It's a bit difficult to understand my title. What am I trying to achieve? My Controller: Public Fixed Results addSomething () {Return getSomething (SOME_FORM); } Public static results addSomething (form of & lt; SomeFormDetails & gt; someForm) {// Do complex things to get someObject and someOtherObject returned is OK (com.me.views.html.pages.AddSomething .render (someObject, someOtherObject , SomeForm)); } Public stable results postFromSomeForm () {form & lt; SomeFormDetails & gt; FillForm = SOME_FORM.bindFromRequest (); SomeForm Details Description = refresh.get (); // Check some if (database.adstaff (details)) {return redirect (com.me.controllers.routes.Get.index ()); } Else {// #### This important BIT #### // this is not possible as the next line (form of someForm) // method // add / s is not possible in the map / /, But what you call me badRequest Return (com.me.controllers.routes.get.add something .render (fillForm)); // #### This is important ##...

python - SQLAlchemy upsert -

I would like to create tables from two existential tables in different sessions. For example: user {uid, fname, lname} salary {uid, pay} => Firstly I add the user to "newtables", and the salary is zero -> OK n = NewTable (uid = 0, full_name = (user.fname + user.lname) ) Session.add (n) session.commit () ... commit, and do something else and then I "merge" salaries in Newtb, The salary is ok, but the full_name has expired. n2 = NewTable (UID = 0, pay = 100) Session.merge (n2) session.commit () Why? How can I increase only some areas? Or just automatically combine this way After all, I got my solution. Inserting from two tables "Select and update" to avoid overwriting a new new object Session.add (doc) for the second table : session.query (NewTable) .filter (NewTable.uid = = Doc.uid). Update (Doctor)

javascript - How do I return this object, instead of logging it? -

I have a static site generator for which I listed all the available partial list in the template / partial var partials = {'header': 'partials / header', // to ' ./templates/partials/header .html "Footer": 'partial / footer' // './templates/partials/footer.html'}; I have put this node script together: 'strict use'; / ** * Dependency * / var fs = Required ("FS"); Var Path = Requirement ("Path"); Var p = 'templates / partial'; / ** * Object with scanned folder and object partial * / fs.readdir (p, function, err, files) {var obj = {}; if (err) {err err;}; for (var i = 0; I & lt; files.length; i ++) {obj [path.basename (files [i], '.html')] = 'partial /' + files [i];}; console.log (obj); }); When it is executed with the root of the project, it is logged: {footer: 'partial / footer html', header : 'Partial / header html'} which is good, but I want to r...

javascript - Masonry plugin returning error when used with Infinite Scroll in tumblr -

I know that a lot has been written about it, but I think I am close to solving this issue I am I am trying to use a theme on which Masonry is installed, but now the customer is asking for eternal scroll and I am having problems with it. In the beginning I was seeing errors in the console for both the masonry and infinite scroll plugin, at least I'm only seeing the masonry error. And it seems that the Infinite Scroll function is calling pages after the post, it's just that Masonry is struggling to add them to the page in the right layout. I think it has something to do with my callback function, but I'm worried that I may also have the ability to load images (this plugin is also called through theme). I have a copy of the current topic: Inline script looks like this: var $ wall = $ ('# posts' ); $ (Window) .load (function) (// grid $ wall messary ({column wide: 84, items selected: '. Post: view'}); // infinite scroll $ ('# post'). Inf...

html - How to send image in PHP mail function -

I want to send the image in the mail. How to add the image so that it will show in the email that I want to add to the image How to use html in the customer message body client message body? This is my code: & lt ;? Php / * subject and email varialbles * / $ emailSbuject = 'check'; $ WebMaster = 'vivek@a.com'; $ EmailSbuject2 = 'Thank you'; $ Client = '$ emailfield \ r \ n'; / * Collecting data variable / $ nameFeild = $ _POST ['name']; $ CityFeild = $ _POST ['city']; $ Countryfield = $ _POST ['country']; $ EmailFeild = $ _POST ['email']; $ PhoneField = $ _POST ['Phone']; $ Other field = $ _POST ['other']; $ Questionfile = $ _POST ['question']; $ Comment field = $ _POST ['comment']; $ Phone1Feild = $ _POST ['phone1']; $ Hear 1 Fields = $ _POST ['Sun1']; $ Hear2Feild = $ _POST ['Sun 2']; $ Hearing 3 Fields = $ _POST ['Sun 3']; $ Hear4Feild = $ _POS...

javascript - jQuery - picture snaps to wrong place -

What happens when you click on IMG2, this animation does, but the image 3 bus IMAGA 1 Pulls to the left of! I do not know why $ (document) .ready (function () {$ (document) .on ('click', 'left', function () {$ idr Attr (" id ") $ Attr ("id") $ idt = $ ('top.) Attr ("id") $ (' # '+ $ Idl) .animate ({' margin-top ' : '0', 'width': '500'}, 650, function () {$ ('#' + $ idl) .removeClass ('(' '' '' top ')} $ (' # '+ $ id Sammet ({'margin-left': '253', 'margin-top': '358', 'width': '247'}, 650, function () {$ ('#' + $ idt). RemoveClass ('top') addClass ('right')} $ ('#' + $ idr) .animate ({'margin AddClass (' left ')})}}}}) "left": '0'}, 650, function () {$ ('#' + $ idr) .removeClass Pre> # img1 {status: absolute; width: 500px;...

c - Why this code couldn't run in windows XP -

I am compiling the following code in Visual Studio 2013. It's running on my windows. I compile the code on it. But when I moved the exe file to the other windows like Windows XP SP2, it could not run on it. When I run this XI file on Windows XP SP2, the following message displayed to me in the output. keylogger.exe is not a valid win32 application. How can I fix this error? The following code is the source code of the program that has an error. #include & lt; Iostream & gt; #include & lt; Windows.h & gt; # Include & lt; Winuser.h & gt; using namespace std; // is used to avoid compilation errors due to the re-definition of variable int catalogs (int key-stroke, four * files); Zero stealth (); // Sneak Out the Announcement Function that you have hidden key main key () {Sneak (); // It will call the Sneak Fest. Four mother; // We declare 'I' here with 'char', while (1) {// we say that for '(1)' code executes (i = 8; i & ...

javascript - Rails console shows view is rendered, but doesn't render in browser -

It looks very strange. I have a link that I want to call the controller an AJAX call so that users' responses can be removed, then redirect to another page. Here's the code for the link: & lt;% = link_to 'try again', reset_score_path, remote: true, controller: "page", verb: "reset_score", category: BTN BTN-Priority TryAgain ", Data: {Confirm: 'This is your score & lt; Strong & gt; Zero & lt; / Strong> Will reset. And reset all of your answers so that you can start afresh Do you want to continue? ', Committed: "Restart", Cancel: "No Thanks", Focus:' none '}, Title: "Try again?" & Gt%; And here is the administrator's action: def reset_score current_user.responses.destroy_all current_user.certificate.destroy redirect_to Action: "course_page1", format: " Html "and end of return But the problem is that nothing happens in the browser; It does n...

arrayofstring - Losing values with iterative realloc in C -

I am working in C with Netbeans8.0. To get a list of words, I have to read the files in an iterative approach. That is, a single file is read in an array of strings, and then add this array to an array. zero merge_array (core ** a, int * m, four ** b, int n) {// ............. .... .......... * / Zero * tmp = realloc (A, (* M + N) * size (* A)); If (tmp == NULL) {perror ("merge -> could not be re-specified"); Exhaust (EXIT_FAILURE); } A = TMP; MEMSAT (A + (* M), 0, N * size (* A)); // ............. Copy String B in .............. * / int i, j = 0; For (i = * M; i & lt; ((M * + N); i ++) {size_t wlen = strlen (b [ja]); A [i] = maulok ((wlen + 1) * sizeof (char)); If (a [i] == tap) {false ("failed to repeat the string"); Exhaust (EXIT_FAILURE); } Mempi (A [I], B [J], VLN + 1); J ++; } (* M) = (* M) + N; // count printf reset ("confirm -% s,% d \ n", a [0], * m); } The above function reads the contents of a file. In the above mentioned main wo...

Android increase space between words -

Image
I'm working in the Android app, which has tables and rows, each line has three values. The problem is that the value is one - are closer to the other and I want to increase the space between them so that each one is above its column, like: but it is displayed like this: Here is a table layout in the xml file: & lt; Table layout Android: layout_wind = "fill_parrent" android: layout_height = "fill_parent" & gt; & Lt; TableRow & gt; & Lt; TextView Android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: text = "name" android: layout_weight = "1" /> & Lt; TextView Android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: text = "email" android: layout_weight = "1" /> & Lt; TextView android: layout_width = "fill_parent" android: layout_height = "fill_parent" andr...

ios7 - Import LocalAuthentification.framework crashes on iOS 7.1 -

LocalAuthentication के उपयोग में एक समस्या है और iOS 7.0 जब मैं स्थानीय एटिफिकेशन आयात करें यदि लक्ष्य आईओएस संस्करण 8.0 से कम है तो मुझे क्रैश हो रहा है। मैंने बिल्ड चरणों में LocalAuthentication.framework को वैकल्पिक के रूप में चिन्हित करने की कोशिश की और कॉल करके वर्ग उपलब्धता की जांच वर isTouchIDSupported: बूल {contextClass जाने यदि: AnyClass = NSClassFromString ( "LAContext") {वापसी LAContext () canEvaluatePolicy (.DeviceOwnerAuthenticationWithBiometrics, त्रुटि: शून्य)।} झूठे वापसी} अगर मैं LAContext टिप्पणी यह ​​दुर्घटना नहीं है () की तरह स्ट्रिंग: वर isTouchIDSupported: बूल {contextClass जाने यदि: AnyClass = NSClassFromString ( "LAContext") {// LAContext वापसी () .canEvaluatePolicy (.DeviceOwnerAuthenticationWithBiometrics, त्रुटि: शून्य)} वापसी झूठी } यह पहली सेकंड एप्लिकेशन अगर मैं से किसी तक पहुँचने की शुरूआत है पर दुर्घटनाओं मेरे कोड के किसी भी स्थान पर एलए क्लास (उदाहरण के लिए LAContext) मैं गलत यहाँ क्या कर रहा हूँ इस ...

Minification of Javascript on the fly with PHP -

I use PHP to extract extra space and lines on the fly for HTML, CSS, and Javascript: - I use the file ob_start ();

ios - UICollectionViewCell causing crash when loading from XIB -

मैं एक है UICollectionViewCell उपवर्ग है, जो केवल एक UIView subview प्रदर्शित करता है अभी एक पृष्ठभूमि रंग के साथ, पता चलता है कि यह नहीं है आदेश में XIB से लोड करने के लिए, मैं इस को बदलने के लिए:। - (शून्य) viewDidLoad { [सुपर व्यूडिडलोड]; [Self.localPlayerItemsView registerClass: [एमबीटीडएक्लेव्यूव्हीईकल क्लास] के लिएसेलवथ रीज्यूसिटिफायर: सेलआईडेंटिफायर]; } इस के साथ: - (शून्य) दृश्यडिडलोड {[सुपर व्यूडिडलोड]; यूआईनिब * निब = [यूआईएनआईबी एनआईबीएथएनआईबीएन: @ "एमबीट्रेडकॉल्यूशन व्यूसेल" बंडल: शून्य]; [Self.localPlayerItemsView registerNib: के लिए nellCellWithReuseIdentifier: CellIdentifier]; } कि करने पर, मैं तो में collectionView पहली पंक्ति पर एक दुर्घटना मिलती है: cellForItemAtIndexPath: : - ( UICollectionViewCell *) collectionView: (UICollectionView *) collectionView cellForItemAtIndexPath: (NSIndexPath *) indexPath {MBTradeCollectionViewCell * aCell = [collectionView dequeueReusableCellWithReuseIdentifier: CellIdentifier forIndexPath: indexPath]...

java - remove an element from a linked list -

I need help extracting an element from the list of links, any help by the user prompt is appreciated, this is what I have done so far, but it does not seem to work. Public Zero Extract List (Linked List) {System.out.println (someList); Scanner input = new scanner (System.in); System.out.println ("Enter a string to delete:"); String s = input.nextLine (); For (int i = 0; i & lt; someList.size (); i ++) {if (s.equals (someList)) {someList.remove (s); Println (someList.get (i)); }} You do not need to use the loop here. You can call the straight away method. Try below Public Zero Remove List (Linked List) {System.out.println (someList); Scanner input = new scanner (System.in); System.out.println ("Enter a string to delete:"); String s = input.nextLine (); SomeList.remove (s); Println (someList); }

python - use variables as key names when using numpy savez -

After loading an npz file, I like to be able to use arrays with keys, for example: KEY1 = "names" file = np.load (npzFilename) data = file [KEY1] But when you save, you have to manually The form must be emphasized, i.e.: np.savez (npzFilename, name = name) Does any one NPZ dictionary key have a variable Is set to use? np.savez (npzFilename, name, key = key1) You can use a dictionary: vals_to_save = {KEY1: name} np.savez (npzFilename, ** vals_to_save) Where you want to programmatically set up vals_to_save as the desired speaker

php - Laravel : create a helper or a model method to fetch data, which one is the best practice? -

I have some advice about that. I have to run a query that returns a list of items from the optional database of the returned web app. This list of items will go inside a form that will be put on the web app's database, so the list will not be modified. . Now my question comes: what should I do? What is the best practice? Will not that similar data be modified to help bring that list? Or to create a normal model for such requests? Thank you! If it's touching a database, then you're probably doing it best in a model. You can assign a model to a model that has many databases with you, so that you can connect some models to your optional database and collect data as needed. You want to do something like those models to Legacy (if they represent legacy data, for example). If the data is not changing, then you may also consider using it to clean the memo () method or otherwise caching the data so that it is same There will be no need to query the data several...

ios - NSUbiquitousKeyValueStore not syncing with iCloud -

I tried everything and read all the topics, but I was not out on why NSUbiquitousKeyValueStore is not being stored on iCloud Is not getting it • A special application ID created • iCloud enabled for this application ID • Built-in Provisioning Profile • On iCloud Enable Project • Setup Key Value Assets: $ (TeamIdentifierPrefix) $ (CFBundleIdentifier) ​​ • Turned on iCloud Drive on Device but NSUbiquitousKeyValueStore Only local saving is When I restart the app it does not receive information from iCloud This is how I am trying: NSUbiquitousKeyValueStore * cloudStore = [NSUbiquitousKeyValueStore defaultStore]; If ([[CloudStore stringforki: @ "teststring"] length] == 0) {NSLog (@ "nothing in Icod - setting a value ..."); [CloudStore Setstring: @ "I'm living in iCloud!" ForKey: @ "testString"]; [Cloudstore synchronize]; [[Synchronize the NSUVITSKalvstor default store]]; } And {NSString * result = [cloud store string foreke...

Perl: Escape special chars in a string to match a regex -

I'm writing bash functions to handle string operations with regexes The built-in works are very bad in the job, I am using perl command to do this. For example, here's my "Stretch" function (in the Bash): #Usage: If (strMatch & lt; string & gt; Lt; regex & gt;); Then ... function strMatch {local str = "$ 1" local regex = "$ 2" local perlCmd = 'if (qq (' $ str ') = ~ m /' $ regex '/ g) {print "0" ; } Other {print "1"; } 'Refund $ (perl -e "$ perlCmd")} Test string: foo-bar \ rLoading ... xx% \ rFile: "Some- (filename. Ext ". regex: -bar (?:. *?) File:". (* * *) \ .ext " All Except for a few things, works fine, I can not find any way to avoid special characters inside the string (for some of them, at least). I am very new in Perl (regex syntax Except)), so I tried and tried successfully without many things here. '' Qq ' with a , whic...

jquery read one class amount between 2 class -

The sub-name in my class is between 5 times and 1 to 2, and between 2 to 3 and 3 to 4 In between I have the class title named and I need to know how many times the title is between those 2 sub. I know that the second sub first class: ('.page_channel .sub: eq (1)') Second: ('.page_channel .sub: eq (2)') But how will it know, how many square titles are between them, 2 sub classes? I have tried that $ ('. Page_channel .sub: eq (1)'). NextAll ('.page_channel .sub: eq (2)'). And self () length; But definitely it does not work in this way HTML: ago All IDs change the ID attribute in the class and you can get the title class div in such a way that: alert ($ (". Page_channel: eq (0)"). (".title") length) / div with div title with first title page_channel div and second page_channel div Update: If you want the square Want the amount of both div between the use of:

c# - How to return a LINQ Anonymoustype to a typed collection -

I am doing LINQ below which I want to return to the collection. Var _NewIds.Field from _NewIds in NewIds.AsEnumerable; _OldIds in allOldIds.AsEnumerable () to join; Integer & gt; ("Id") is equal to _OldIds.Field & LT; Integer & gt; ("Id") where _NewIds.Field & LT; Boolean & gt; ("IsExist") == True & amp; Amp; _NewIds.Field & LT; String & gt; Integer & gt; ("Id"), name = _NewIds.Field & LT; String & gt; ("Name"), value = _NewIds ("FIELDNAME") == "FinalValue" new {ID = _NewIds.Field & lt selection .field & lt; Decimal & gt; ("Price")}; & Lt; STD & gt; LstCustomWebsiteVerifiedIndex = New List & lt; Std & gt; (); This class is class haivg number, name and value as DataMember. Any idea how to typecast it? Instead of presenting it for the first time for an unknown class, you need to enter std New STD selection {id = _NewId...

vb.net - PCL-compatible Chr and Asc in VB? -

I am porting an old VB code base in a PCL-compatible format. I have been able to create new versions of things like Left and CINT, but ASC and Crowe have stumped me. The typical answer is "Microsoft Import. Visualbasicic", but it is not present in PCL. In C # you get the Unicode value, it appears to be DirectCast in str = VB.net, but that does not work Does anyone know that using ASL and Crossover using PSL-compatible functions How to write? The key is System.Text.ASCIIEncoding.UTF.GetString / GetBytes These two arrays work on, Therefore, before going into GetString, you have to copy a substrings (0,1) in a variable () before going to get input into my input (an int 32 in my case), byte () and getbacks. This is, of course, more complex than C # solution, where you can only enter four / integer ... public function ASC (string as CharIn) Char = convert as integer dim C Four Character (0) = C Return Convert.ToInt32 (System.Text.ASCIIEncoding.UTF8.GetBytes (CARRA) (...

c# - Windows Phone ToastNotification cancellation -

I have made toast notices as per the instructions of this article By clicking on the notification it canceled And it is removed Action Center Is there no way to remove notification by clicking on it? This article explains how to handle the behavior of all messages in the Action Center : What you can do again is toast sending and pressing popup: Toast SuppressPopup = true; . ToastNotificationManager.CreateToastNotifier () Show (Toast);

php download multiple .zip files from xml -

I want to download some .zip files from php with an XML file ... Example XML Code: & lt; Index & gt; & Lt; Package unzip = "false" ignore = "wrong" & gt; & Lt; FileSize val = "xxxxx" /> & Lt; Filename val = "folder1: file1.zip" /> & Lt; Language val = "all" /> & Lt; / Package & gt; & Lt; Package unzip = "false" ignore = "wrong" & gt; & Lt; FileSize val = "xxxxx" /> & Lt; Filename val = "folder2: file2.zip" /> & Lt; Language val = "all" /> & Lt; / Package & gt; & Lt; / Index & gt; As you can see in the filename, there are different (unknown) specification where the files are on my server ... For example, file1.zip in folder1 is and when I download them, I also have to do them in defined folders, so I have to keep file1.zip in Folder 1 So here's my PHP code, I've got all th...

join - Trying to create one table from four -

I am trying to create a query that draws results from at least three different tables with multiple relationships I I want to end with a table that lists cases, results and complaints. There can be no one in all cases, one or many results, the same relationships apply to complaints I want to be able to be listed once, then the subsequent columns will list all the results and complaints related to that matter for. Instead of repeating the cases, I have tried to GROUP_CONCAT to get results in a column, but when I use UNION to unite the results and complaints I do, a column header overwrites the other. Any help is appreciated and there is a link to Bella Query structure: Select c.caseID, c.caseTitle, c.caseSynopsis / * if more columns ... also add to group * /, group_concat (co.concern), group_concat (Resource Text) from Kesmith Smith C CEET JOIN JNGGNCNCARNCNSMMRI JCC ON CCC CIDID = JCC Cassariery / F. JCC in the form of lower birth attendance. with. Connancy_FK = Co...

java - Jetty: load a context from another jar -

I have created an application that loads multiple plugins on SPI. Each plugin has the framework plugin interface To implement. Public Interface Framework plugin {... ContextHandler getWebContent (); String getPluginID (); ...} An example implementation will be ... ContextHandler getWebContent () {WebAppContext wac = new WebAppContext (); Wac.setBaseResource (New Resource Calculus (new string [] {"./src/main/webapp"})); Return wac; } ... The main-project runs a single jetty instance, which should be used by all the plugin providing web-based services. A plugin should be able to configure the personal environment in its own context, except for the original URL, which is managed by the main project. ... for (FrameworkPlugin p: PLUGINS) {ContextHandler h = p.getWebContent (); H.setContextPath (. "/ Plugin /" + p.getPluginID () toString ()); Collection.addHandler (h); } JT Instance. SetHandler (collection); ... So in principle, plugins should be ...

How to run a rule in outlook using an external vbscript file ? -

I have a rule in my Outlook to set the rule on fire to external .vbs. File Required How Can I Do It? Set myOutlook = createobject ("outlook.application") I tried to read the documentation on the Microsoft website, but not a rule object is a rule object! Rule.Execute Method (Outlook)

liquid - Use jekyll variable inside replace filter -

मेरे पास जेकेल में एक आरएसएस टेम्पलेट है: --- लेआउट: शून्य --- & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & Lt; फ़ीड xmlns = "http://www.w3.org/2005/Atom" & gt; & Lt; शीर्षक & gt; {{site.title}} & lt; / title & gt; & Lt; link href = "{{site.url}} / feed.atom" rel = "स्व" / & gt; & Lt; link href = "{{site.url}} /" / & gt; & Lt; updated & gt; {{site.time | Date_to_xmlschema}} & lt; / अपडेट किया गया & gt; & Lt; id & gt; {{site.url}} / & lt; / id & gt; & LT; लेखक & gt; & Lt; नाम & gt; {{site.author.name}} & lt; / name & gt; & Lt; ईमेल & gt; {{site.author.email}} & lt; / ईमेल & gt; & Lt; / लेखक & gt; {% Post.posts सीमा में पोस्ट करने के लिए: 20%} & lt; एंट्री & gt; & Lt; शीर्षक & gt; {{post.title}} & lt; / शीर्षक & gt; & Lt; link href = "{{site.url}} {...

javascript - Add label to emails in Gmail fails -

We are trying to add labels to Gmail in threads. Versace added the same output "2014 / October / Sent" but only SentLabel2 works, if we set the centered label to thread [i] .addLabel (SentLabel); This fails. We need to get it to St.Label. We have done an auto-month job like this (which is available in the calendar month, thus we need to go to the script manually every month and do not need to change variables. Is): var SentLabel = "2014 /" + month order [d.getMonth ()] + "/ sent"; It looks like now: function wtf2 () {var SentLabel = "2014 / October / Sent"; Var sentLabel2 = GmailApp.getUserLabelByName ("2014 / October / Sent"); Var thread = GmailApp.getInboxThreads (0, 5); (Var i = 0; i & lt; threads.length; i ++) for {var labels = thread [i] .getLabels () [0]; Formula [i] .addLabel (SentLabel); }} The reason your statement fails below is because SentLabel is a string variable , Not a GmailLabel variable th...

c# - Linq Projecting from one type to a second using fluent syntax -

I have an EF table / object that I want to map to a new object which is almost identical. I could use Automaker but it was hoping to do with Linq projection. I am using this code to create a list of objects. var ci = db.Incidents Where (a => a.FollowUpDate.Value.Year == DateTime.Now.Year & amp; a.FollowUpDate.Value.Month == DateTime.Now.Month) .Oolist (); What problems are coming in my understanding of using projection to convert events into developments? You can project your results on a query from your class object. Assume that your class name is MyClass , you can do it: var ci = db.Incidents. Where (a = & gt; a.FollowUpDate.Value.Year == date time.N. year and amp; a.FollowUpDate.Value.Month == DateTime.Now.Month). Select (R = & gt; New MyClass {property1 = r.Property1, // Properties of the rest .....}). To create the list ();

windows - Is it possible to look at the Java console of a Tomcat 7 server? -

I have the Tomcat 7 server at the top of Windows 08 Enterprise I I talked to the old sysadm And it seems that the entry was not enabled anywhere, and since it is the first time I have to debug a server problem - because a new sysadm- my first response to seeing the server log is to see if a problem In particular, the Java console log I was roaming around, and Tom Team manager was able to turn, but it did not make sense, or if there is no console. Is it possible to see the console too? Console log files are usually TOMCAT_HOME / log / Are in

javascript - HTML5 - Draw on canvas after timeout -

I am trying to draw a line on a canvas after a timeout period. One of the "Line Two" parameters is being sent a value from a variable which is being declared in another script and given in the form of a window. Var .... I have a console log set executed at the same time as the variable in the carvas script is also used. OnLoad executes everything in the same way as after the expiration of the console, the console shows that there is a value in the variable, but the canvas line is not ready. At first I could not find any time constable and the variable was coming back undefined. I opted to go with a timeout, because I still do not fully understand the callback. Any advice would be greatly appreciated! & lt; Script & gt; Window.setTimeout (render, 8500); Function render () {var canvas = document. GetElementById ('canvas'); Var reference = canvas.getContext ('2d'); Var end = window.testVar; Context.beginPath (); Context.moveTo (...

c++ - Function arguments referring to the same variable -

कॉलिंग f (a, a) निम्न कोड में अपरिभाषित व्यवहार है? #include & lt; iostream & gt; Int f (int और m, int & n) {m ++; n ++; वापसी एम + एन; } Int main () {int a = 1; Int b = f (a, a); } m संशोधित करने के संबंध में कोई नहीं है और n चूंकि दोनों चर के संशोधनों का क्रम है। m का संशोधन n के संशोधन से पहले होगा क्योंकि वे पूर्ण अभिव्यक्ति और पूर्ण अभिव्यक्ति के सभी दुष्प्रभावों की अगली पूर्ण अभिव्यक्ति के साइड इफेक्ट से पहले अनुक्रमित होते हैं । इस अनुभाग का संबंधित अनुभाग 1.9 प्रोग्राम निष्पादन जो कहता है: प्रत्येक मूल्य गणना और पक्ष पूर्ण-अभिव्यक्ति से जुड़े प्रभाव को प्रत्येक मूल्य गणना और साइड इफेक्ट से पहले अनुक्रमित किया जाता है जिसका मूल्यांकन अगले पूर्ण-अभिव्यक्ति के साथ किया जाता है .8। और: यदि एक स्केलर ऑब्जेक्ट पर एक साइड इफेक्ट एक ही स्केलेर ऑब्जेक्ट पर या तो दूसरी स्केलर ऑब्जेक्ट पर एक साइड इफेक्ट के सापेक्ष या एक ही स्केलर ऑब्जेक्ट के मान का उपयोग करके एक वैल्यू कंपेशन के सापेक्ष न हो, तो व्यवहार अनिर्धारित है दूसरे हाथ पर निम्न:...

php - continue 2 and break in switch statement -

I am new to PHP and have seen the code below online in continue 2 and Break is a switch / case statement, what does it mean? foreach ($ element as & element) {switch ($ element ['type']) {case a: if (condition1) issued 2; break; Case B: If (condition2) continues 2; break; } // The remaining code here, inside the loop, but outside the statement statement} From: Continue accepts an optional numerical argument which states how many levels should be closed, it should go to the end edge. The default value is 1, thus skipping to the end of the current loop. to If you have a switch inside a loop and want to continue, for the next iteration of the external loop, continue using 2 Please. The PHP switch continues to execute the statement by the end of the block, or the first time it has a break statement. If you do not write statements of a break at the end of the statement list of any case, then PHP will execute the following case statements. Expla...

python - How do i get newest date through xpath? -

मेरे पास एक्सएमएल है: & lt; सामग्री & gt; & Lt; लेख शीर्षक = "मैं कम्यूट, इसलिए मैं" id = "a1" & gt; & LT; लेखकों & gt; & Lt; लेखक & gt; फिलबर्ट वॉन कुकी & lt; / author & gt; & Lt; लेखक & gt; ऐलिस ब्रॉक्मन & lt; / लेखक & gt; & Lt; लेखक & gt; पेड्रो स्मिथ & lt; / लेखक & gt; & Lt; / लेखकों & gt; & LT; पत्रिका & gt; & Lt; नाम & gt; कम्प्यूटेशनल मेटाफिज़िक्स के जर्नल & lt; / name & gt; & LT; मात्रा & gt; 3 & lt; / मात्रा & gt; & LT; मुद्दा & gt; 7 & lt; / मुद्दा & gt; & LT; प्रकाशित & gt; 04/11/2006 और lt; / प्रकाशित & gt; & Lt; पृष्ठ प्रारंभ = "42" अंत = "49" / & gt; & Lt; / पत्रिका & gt; & Lt; / लेख & gt; ... & lt; / सामग्री & gt; मूल तत्व -> सामग्री में समान अनुच्छेद नोड हैं I ने अजगर कोड में अपने XML को पार्स किया है और अधिकतम तिथि मान प्राप्त करना चाहते ...

shell - how do I pass y to [y/n] kind of questions in linux automatically -

I have to automate some installation, but in some commands it asks, "are you sure you want to continue Are [y \ n] = "How can I always pass y to all such queries to automate my script? resonant 'y y' | Sudo rpm -Uhh https://mirror.webtatic.com/yum/el6/latest.rpm sudo yum install yum-plugin-replace-sudo instead of yum mysql-libs-replace-mysql55w-libs sudo yum install mysql.` Uname -i` yum-plugin-replace echo yes "yes" | Sudo yum install mysql55w mysql55w-server sudo service mysqld start sudo mysql_upgrade -u root Here is my shell script. I need to implement it completely with any such questions. You can use the yes utility: $ yes | Sudo rpm -Uhh https://mirror.webtatic.com/yum/el6/latest.rpm

asp.net - mvc textboxfor using an input mask for decimal -

We are using MVC and I want to see if there is another better way to handle this problem. We currently have a decimal field declared in a model named AmountOfContract: [DisplayName ("amount of contract")] [DisplayFormat (ApplyFormatInEditMode = true, DataFormatString = "{ 0: c} ")] get public decimal AmountOfContract { Set; } was displayed on a page using: @ html.LabelFor (model => model.AmountOfContract, new {@ Class = "control -label col-md-2"}) & lt; Div class = "col-md-4" & gt; & Lt; Div class = "input-group m-b" & gt; & Lt; Span class = "input-group-connector" & gt; $ & Lt; / Span & gt; @ Html.TextBoxFor (model = & gt; model.AmountOfContract, new {@class = "form-control"}) @ html.ValidationMessageFor (model => model.AmountOfContract) & lt; / Div & gt; & Lt; / Div & gt; It was working fine. Later, our users requested that they have a textbo...

Highcharts - change pie slice color on existing chart -

I have a pie chart that already exists. I need to change the color of the specific piece I have tried ... chart.series [0] .data [4] .graphic.attr ({fill: '# ff0000'} ); But it only temporarily changes color until it becomes the object. I have also tried to make a general change of alternative method. How do I change it for the good? Just use the method, such as: chart.series [0] .data [4] .update ({color: '# FF0000'}); .

javascript - get some parameters to selected item in typeahead bootstrap -

I am using Twitter Bootstrap and I'm using this type-add I used this code: $ ('# Demo1'). TypeHead ({Source: [{ID: 1, Name: 'Toronto', Country: 'USA'}, {ID: 2, Name: 'Montreal', Country: 'China'}, Country: 'China'}, ID: 5, Name: 'Boston' country, country: 'USA', country: 'USA'}, {id: 4, name: 'buffalo', country: 'isa'}, {id: 6, name: Country: 'Turkey'}, {ID: 7, Name: 'Dallas', Country: 'Italy'}, {ID: 8, Name: 'Vancouver' Country: 'Turkey'}, {ID: 9 , Name: 'Seattle', country: 'France'}, {ID: 10, name: 'Los Angeles', country: 'USA'}], items selected: displayRes}); and this displayRes function function displayRes (item, val, text) {console.log (val); Console.log (text); $ ('# Demo1') Val ('') } When I get into the console val : the id of the selected item is & amp; Text : The name of the ...

javascript - How do you make a rectangle(HTML element) controllable with the arrow keys? -

How do you create a rectangular or other HTML element, but for example say a rectangle may be able to rotate around it The movement is controlled by the arrow keys (e.kcode and case #) and then how can you create spaces, can not go into the rectangle? "post-text" itemprop = "text"> . $ (document) .ready (function () {$ (document) .keydown (function (e) {// left arrow if (e.wich == 37) {$ ('# box') CSS ('left', '- = 1')}} // top arrow if (E. == 38) {$ ('# box'). CSS ('top', '- = 1'); } / Right arrow if (E. ==339) {$ ('# box'). Css ('left', '+ = 1');} / / down arrow if (E. == 40) { $ ('# Box'). CSS ('top', '+ = 1');}})}}; You can see the encoded. He said, the best way to do this was to use HTML5 canvas. It was a quick demonstration with a div.

c - Cannot free data of a buffer after it was reallocated inside recursive function. What can be the reason? -

So I have to face a problem - when I have data that is greater than the initial size of my buffer And I recolor inside the recursive function, I get an error to free its buffer * error for malloc: *** object 0x100106da0: pointer is being freed * This code is: zero recPrint (FILE * file, char * buffer, int realBufferSize, int buffer Car, char * freeCh, NodePtr * temp) {// some code here ... int * intArr = temp - & gt; UsedIndices; Int i = 0; For {i = 0; i & lt; 36; i ++} {if (intArr [i] == 1) {if (i> 9) {* freeCh = i - 10 + 'a'; } And {* freeCh = I + '0'; } RealBufferSize ++; If (realBufferSize> buffer size) {buffer = reel (buffer, (buffer size + 100) * size (four)); // & lt; & Lt; - REALLOC buffer size here = + 100; } FreeCh ++; RecPrint (File, Buffer, Actual Buffer Size, Buffer Size, Free Chaw, and Temporary -> Kids [i]); // Now we need to remove all extra characters until the next turn freeCh--; * Freech = '\ 0'; }}} Void ...

php - Can a server block requests from a website of mine? -

A website hosted on a server (A) that PHP on another server hosted on another server PHP (HTPRQUEST) (B). Every time a user clicks on a button on the website's hosted on A, requests A to B to get an html page. Can a? short answer: yes it is possible. Long answer: This is not practical though you can block the IP address of the server, but if the owner of the server really wants to do this, then he can get a free proxy and then send a request, you can It will not be able to say whether the request has been sent from the server or a valid user

android - MAT HPROF: No space left on device -

I'm running my app while debugging with Matt on my phone. After trying to dump an HPRF file in Eclipse, I get an error: No space left on the device that failed to save the HPF data to a temporary file. I have already done a Google search on it .... I am thinking that what this device is referring to is my phone? And did not leave any room? What will this memory refer to? Now, every time I try to dump an HPROF file, I get this error. How does anyone decide on this? Finishing it because the / tmp was 100% complete on my computer. Deleted unnecessary / tmp files, and it's OK.

ios - Executing code after all requests have finished (Facebook SDK) -

Is it possible to withdraw from ASCII full block in addition to the delegation? ? It is best to pass the value by calling a block to - (NSMutableArray *) facebookGalleryImages {// array which organizes dicts for each image containing both thumbnails and the original image URL NSMutableArray Will create * allFBImages = [[NSMUTABELARROL] INIT]; // start the Facebook API call [FBRequestConnection startWithGraphPath: @ "Me / Album" completionHandler: ^ (FBRequestConnection * connection, ID result, NSError * error) {if (error!) {// Receive all the data in the album NSArray * feed = [ Result objectForKey: @ "data"]; For (Enciphese * Featured) {// Get the Album ID of each album NSString * albumID = [dict objectForKey: @ "id"]; // New API call to get image data for a specific album id [FBRequestConnection startWithGraphPath: [NSString stringWithFormat: @ "% @ / photos", ALBUMID] completionHandler: ^ (FBRequestConnection * connection, ID result, NS...

c - Allowing a user to pick an option for how a program runs at the terminal -

So, suppose I have two functions that do the same thing but with a different algorithm. I want to let the user choose one option or another on the terminal. When the user chooses which options they want, then something like this should be ... ./a.out Option 1 or . / A.out option 2 Before I came here and asked, read more on this, so maybe I could have done some code, but I do not even know that What is said, so I can search for it! Any help would be greatly appreciated, thanks! sample #include & lt; Stdio.h & gt; #include & lt; String.h & gt; Int main (int argc, char * argv []) {// Eg. ./a.out option1 // argc: 2 / argv [0]: "./a.out" (or it may be a different example, for example, fullput or etc.) // argv [1]: " Option1 "int opt ​​= 0; If (argc> 1) {If (strcmp (argv [1], "option1") == 0) opt = 1; And if (strump (argviz [1], "option 2") == 0) opt = 2; Else opt = -1; } Switch (opt) {Case 0: printf (...

.net - Add a derived column to a table via C# script in SSIS -

Image
I want to add a column to an existing table with the calculated using a hash function (MD5) and results. I am using a script function in SSIS to write a small script # I here is my script: using the system; Using System.Data; Using Microsoft.SqlServer.Dts.Pipeline.Wrapper; Using Microsoft.SqlServer.Dts.Runtime.Wrapper; Using System.Security.Cryptography; Using System.Text; Using System.Windows.Forms; [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute] public class ScriptMain: UserComponent {public override void PreExecute () {base.PreExecute (); / * * Add your code here * / / Public override zero PostExecute () {base.PostExecute (); / * Add your code here * /} public override void Input0_ProcessInputRow (Input0Buffer row) {/ * using your code * / Add here (MD5 md5Hash = MD5.Create ()) {string hash = GetMd5Hash (md5Hash, line ); MessageBox.Show (hash); }} Static string GetMd5Hash (MD5 md5Hash, Input0Buffer input) {// input string to calculate convert a byte ...

Load initial HTML into DIV when using jquery .load to change HTML in that DIV -

I have some basic jquery that is changing the content of a div. The only thing that I can not know is how it shows one of the four external HTML files (e.g., Lookbook 20141217. HTML) when the page is first loaded. Right now, the container DIV "lookBookWindow" is empty unless one of the "buttons" is clicked. HTML & lt; Div id = "lookBookMain" & gt; & Lt; Div id = "lookbookwindow" & gt; & Lt; / Div & gt; & Lt; Input id = "lookbook20141217" class = "thumbnail RM" type = "image" src = "thumbnail / 20141217.jpg" alt = "mauris lookbook 20141217" width = "220" height = "220" range = "0" /> ; & Lt; Input id = "lookbook20141114" class = "thumbnail RM" type = "image" src = "thumbnail / 20141114.jpg" alt = "Maurice Lookbook 20141114" width = "220" height = "220" ra...

c# - Why can't a member field have a field initializer call a member function? -

I tried to create a similar area within an MVC controller: Func & lt; MyModel, ViewResult & gt; ModelResult = (model) = & gt; View ("myview.cshtml", model); This is the result of a compilation error An object reference is needed for a non-static field, method, or property 'System.Web.Mvc This code works fine as a method Private View Result Model Result (MyMold Model). {Return view ("MyView .cshtml", model); } This works fine even when the field started by the consultant Public MyController () {ModelResult = (model) = & gt; View ("myview.cshtml", model); } Why is the field initiator considered as a constant reference? Field initializers run in the reverse order of the constructors before the constructor. That is, they go from the most derived type to the least derivative type, and at least the derivative types of fields will be started before the name of any consultant. The decision of a design was not all...

python - Django runtime error during insertion from admin -

itemprop = "text"> I have a Django model as follows: class M1 (models. Model): m1code = models.CharField (MAX_LENGTH = 25) m1title = models.CharField (MAX_LENGTH = 500) m1description = models.CharField (MAX_LENGTH = 1000, null = true, blank = true) def __unicode __ (self): return self .m1title class M2 (MPTTModel): M 1 = models.ForeignKey (M1) name = models.CharField (MAX_LENGTH = 500, unique = false) parent = TreeForeignKey ( 'self', null = true, blank = true, related_name = 'Children') DEF __unicode__ (self): return self.name def save (self, * args, ** kwargs): degreeroot = M2.objects.get (Name = self.m1.m1title) requires = M2.objects.create (name = self.name, parents = degreeroot, m1 = self.m1) Here's a model to me M2 (MPTT model) is a foreign key of M1. Whenever I enter an entry from the admin in M2, then I want DJenggo to enter the value of the mother in M2 on the basis of selection of M1. Here I have defined a saved () to do this. But ...