Posts

Showing posts from January, 2010

mysql - Performing a Sum of COUNT after GROUP BY and HAVING COUNT > 1 -

I have the following query, which I have to submit the calculation table for any count of more than 1. I definitely want to do this: Selection number (id) count, id, location_id, time, weekofiefer (time) from table where weekofyear (time) = '28' Group Location_id, ID being calculated as & gt; Count Number Result: Count id location_time time weekfire (time) 5 32265 409 7/12/14 3:58 28 5 32266 409 7/12/14 3:59 28 5 27532 39 9 7/12/14 4:54 28 4 31124 41 7/7/14 4:41 28 So I "post-text" itemprop = "text"> A simple subtitle should do this with your own inquiry: SELECT SUM (t.count) (selection number (id) count, id, location_id, time, weekday (time) from table where weekofyear (time) = '28' place_degroup, id Hoan Due to the cause & gt; 1) T as

apache - Redirect ?lang=en string to subfolder /en -

I want to redirect as many as this pattern: domain com / xxx /? Lang = en to domain.com/en/xxx/ For example: Domains. Com / About /? Lang = en to domain.com/en/about/ all links to * /? Lang = en code> just one goal. rewrite% {QUERY_STRING} ^ lang = en RewriteRule ^ en / about /? [R = 301, L] You can use these rules in your root .htaccess : rewinding sign on rewrite% {THE_REQUEST} \ s / + ([^ /] + \ / \? Lang = ([^ \ s & amp; +++] [NC] rewritable ^ /% 2 /% 1? [R = 302, L] Revoked% {REQUEST_FILENAME}! -d Rewrite% {REQUEST_FILENAME}! -f Riveritium ^ ([ed] {2}) / ([^ /] +) /? $$ 2? Once the code is working properly, LAN = $ 1 [L, QSA] change 302 to 301 once.

java - Transferring collection object from one jsp to another -

I get data from the database and store it in some archive in a collection (say one.jsp). I should have this collection object available in another jsp (two .jsp). There can be large data in it, so, I have used the Java Bean in the following manner. Public class Beacon series SerialJobs {Private Hashmap & lt; String, list & lt; String & gt; & Gt; MyMap; Private Ent ID; Public int getId () {return ID; } Public Zero setId (int id) {this.id = id; } Public Hashmap & lt; String, list & lt; String & gt; & Gt; GetMyMap () {return myMap; } Public Zero SetData (Hashmap string> gt; & gt; my map) {this.myMap = myMap; }} I am setting the beans in One.jsp in the following manner. & lt; Jsp: useBean id = "Data object" class = "com.mapac.bine class" scope = "session" /> & Lt; Jsp: setProperty name = "dataObject" property = "mam map" /> & Lt;% dataObject.setData (myMapObj); & G...

Calling C++ DLL by pushing a button in C# GUI -

I have a DLL with the following C ++ export function: extern "C "__declspec (dllexport) Zero * OPS_FDD (constant four * char_Address, constant integer int_NumChann, constant integer int_SamplingFreq) {FDD * FDD_Ptr_Object = zero; If (FDD_Ptr_Object == zero) {// if the condition to avoid memory leakage FDD_Ptr_Object = new FDD (char_Address, int_NumChann, int_SamplingFreq); } (FDD_Ptr_Object == zero) {// if throw "FDD object indicator can be allocated to memory: can not be done"; // __declspec can not throw in (dllexport) marked deportation 'C' std :: court & lt; & Lt; "Error: Allocate memory to FDD object pointer:" & lt; & Lt; '\ N'; System ("pause"); } FDD_Ptr_Object; // De-lock the pointer to be removed; FDD_Ptr_Object = NULL to avoid memory leak; // Set the indicator for NULL return; } Now I want to call this DLL by pressing the button in my C # GUI. To add the code to the code, what are the lines of c...

Is there a way to center file on cursor like Emacs Ctrl-L, but in IntelliJ? -

क्या कर्सर पर फाइल करने का कोई तरीका है, जैसे इमैक Ctrl + L , लेकिन IntelliJ में? मैं IntelliJ के साथ एक फ़ाइल के माध्यम से बेहतर स्क्रॉल करना चाहता हूं जब मैं देखने योग्य स्क्रीन के नीचे जाता हूं, तो मैं स्क्रीन के मध्य में कर्सर के साथ फाइल को केंद्र में डाल करने के लिए हॉटकी Ctrl + L चाहूंगा। केंद्र पर स्क्रॉल करने के लिए Ctrl + एम का उपयोग करें एम = मध्यम।

c++ - Equivalent of boost::file_system::no_check in boost::filesystem V3? -

बढ़ावा :: फाइलसिस्टम :: no_check boost :: में मौजूद नहीं है फाइल सिस्टम संस्करण 3 (बढ़ावा v1.54)। पुस्तकालय के नए संस्करण में उचित समतुल्य क्या है? अगर आप को देखो, तो आप ध्यान दें कि नाम की जाँच सुविधा हटा दी गई थी। इसके अतिरिक्त इंगित करता है कि नाम की जांच को हटाया गया था। पथ (const string_type & str, name_check) के लिए साधारण कार्य 1.4 9.0 में मौजूद था जिसमें name_check को अनदेखा करने का समावेश था। जैसा कि आप डॉन ' टी नाम की जांच करना चाहे तो बस इसे छोड़ दें।

scala - Elegant Way to Check toInt or toBoolean -

I have a group of fields that I am parsing in XML and they are int or type on the basis of boolean field The problem is that in some cases of the XML file this tag may not exist, it naturally throws a runtime error when I have a blank for boolean or int Try to convert code> string . I'm new to Scala, is there a way to use the option class to make it better? This is how the code looks without the handle. Parental node is always present but can not have hair nodes or fields. itemprop = "text" (parentNode / childNote / area) .text.toBoolean You can use scala.util.Try for it. If code inside try -block is successful, it will give a success (result) . Otherwise a failure (exception) has been refunded. Try (parentNode / childNote / field) .text.toBoolean) From here you have several options to deal with it. I guess That, in the case where the area does not exist, you have no default value 1 failure is not important, then you can use di...

Automake doesn't recognize Objective-C/C++ -

is designed for the creation of which I have configure.ac shared library (both Linux and MacOS). Now I'd like to add a special demo app that uses this library and shows its features, though this demo app is only for MacOS and in it. MM file is (main.mm). I'm trying to define a target like this for the demo app: if OS_DARWIN EXTRA_PROGRAMS = app-demo Ap_demo_sisi = Obijesi Aep_dimo_ CXX = Obijesi Ap_dimo CRS = Demop / config. CC Demop / config H \ demoapp / main.mm demoapp / AppDelegate.m \ demoapp / renderer-stub.cc Demop / Renderr- stub.h \ demoapp / view.cc demoapp / view.h app_demo_CPPFLAGS = ... the # directories Includes app_demo_LDFLAGS = .. # libraries and library search path endiff This is my top-level makefile .There is and as you can see, Demoap folder demo app and two objectives in all source files C: Muky.amm and Aepdileget.am However, when I try to create an App demo I, I got it is: undefined symbols x86_64 for Architecture: "_main", refers t...

javascript - Trying to create a print page that only shows 3 divs -

I am trying to write a code that hides all the elements of a page in addition to three divs. This is because people will have a friendly version of the printer. I wrote it in jQuery but (this is political with our vendor) it will not work. Here is the code: & lt; Script type = 'text / javascript' & gt; Function prints () {document.getElementsByTagName ("body"). Style.display = "none"; Document.getElementById ("hider"). Style.display = "inline"; Document.getElementById ("hider1"). Style.display = "inline"; Document.getElementById ("hider2"). Style.display = "inline"; }; & Lt; / Script & gt; When clicking on a button called the print function, I have been able to create a Divis Display but everything is not working to rotate. Any ideas? I think I am using getElementsByTagName incorrectly, but I am unsure. you is getElementsByTagName incorrectly ( It returns a no...

c# - Entity Framework recursively include collection for each entity from included collection -

I have the following locations where I am trying to include people's addresses in countries. Country country = _db. Country. Included (P => P. CT people. ????) Where (....) Not sure how to do this work? From: Collection, a compilation and a reference below Level: query.Include (e => e.level1collection.Select (l1 = & gt; l1.Level2Collection.Select (l2 = & gt; l2.Level3Reference))). Then try your case country country = _db.Countries. Include (C = & gt; c.Cities.Select (cc = & gt; cc.People.Select (p = & gt; p.Addresses))). Where (....) To access this extension method, it is necessary to use the instructional System.Data.Entity;

java - How to update a progress bar from a method inside SwingWorker -

I am trying to update a progress bar and I can not do it. My code is something like this: The public class extends MyWorker SwingWorker & lt; Zero, zero> {Public Voice Doine Background () {howMany = Integer.parseInt (textField.getText ()); String result = long method (how many); Label.setText ("Hello, you have" + results); }} The implementation of the public square event ActionListener {Public Zero Action Functional (ActionEvent E) {label2.setText ("whatever"); Button.setEnabled (wrong); MyWorer.addPropertyChangeListener (this); MyWorker.execute (); } Change the Public Zero Property (Change Property Event Event) {If ("Progress" .equals (event.getPropertyName ())} {int currentPercent = (int) event.getNewValue (); ProgressBar.setValue (currentPercent); }}} Therefore longMethod () in setprogress in DoInBackground can not be used is a method in which there is a very slow loop, which is placed in the second class. I have passed such a...

How to link to a class with selective text in ruby? -

Therefore, I am trying to create a link that has a class with some given link and some text here. - "/ account / # {@ name}",: ID = - & Quot; Cancel & quot; app:, class = & gt; "cancel-app") What do I need to do is find links to this category called "Canceled-app" , Which is actually a small canceled image with its , I Save "on the sessions and wanted to get exit" or "quit" my. "Save & amp; Exit "or" Exit "button should also be linked. Something like this - [Cancel button]" Exit "(where both links at one place) Now, what this code does, the image and the text on top of each other, which makes sense, what I thought I wanted to do was put session ID in one variable and then put it in the same way after the link 'Save' and 'cancel': 'exit' = link_to ("/ account / # {@ name}" - = @exit_text = session [: request_id]? : Id = & gt; ; 'Cance...

BigQuery table contains mystery duplicate rows -

I have a large table that contains 87 rows, but when 5916 rows were returned This table was made by using the public data: sampling samples using Java SDK. With a overwrite table of overwrite table in a destination table with Wikipedia a WHERE id = 1711042 . The target table was present with the same 87 rows. I can do this query again + table overrides with no change in the number of multiple rows. It has its own 87 rows on the SELECT * FROM [publicdata: samples.wikipedia] WHERE id = 1711042 . Creating a new table with the same query is the exact number of rows in the query I hope that if I leave the offending table and rest it again from scratch then it is decided Will go I think I have created a table in question safe.com.fme-big-query-api: testuite.pr46492_nonpublic_read appears in the world if someone claims me Wants to confirm Is it corrupt? is it my fault? Can I avoid corrupting the tables in the future? All suggestions appreciated. Thanks for the rep...

css - Proper HTML link formatting - can two divs be inside of one tag? -

इस सवाल का पहले से ही एक उत्तर है: पृष्ठभूमि-छवि के साथ: (इतनी मूल रूप से एक तस्वीर) जिसमें एक div नेस्टेड होता है जिसमें चित्र पर पाठ प्रदर्शित होगा। पाठ और तस्वीर divs दोनों लिंक हैं जो एक ही स्थान पर जाएं मैं चाहता हूं कि मेरे उपयोगकर्ता पृष्ठ से दूर नेविगेट करने के लिए पाठ या तस्वीर पर कहीं भी क्लिक कर सकें। दो टैग का उपयोग करने के बजाय जो कोड की एक ही पंक्ति में एक ही चीज़ से लिंक होगा I देखा कि मैं एक ही टैग के अंदर दो चित्रों, चित्र और पाठ को रख सकता हूं और क्रोम इसे अनुमति देता है .. लेकिन मुझे नहीं पता कि अन्य ब्राउज़रों में इस तरह की चीज़ों का समर्थन कैसे होता है। मैं क्या कर रहा हूं इसका एक उदाहरण: & lt; a href = "https://theartofmikeyjoyce.com/" & gt; & Lt; div वर्ग = "सेल E4" & gt; & Lt; div वर्ग = "पाठ" & gt; मिइके & lt; br / & gt; & Lt; p & gt; CLUB द्वितीय में & lt; / p & gt; डिजिटल कोलाज & lt; / div & gt; & Lt; / div & gt; & Lt; / a & gt; क्या यह...

ruby - Is there a more rubylike way to do output_val = [ input_val, max ].min? -

Sometimes I need to do something like this: output_val = (input_val & Lt; max)? Input_value: Max And if I'm stingy on space, then I can choose the option of: output_val = [input_val, max]. Min Is there a short choice without sacrificing the expression? Monkey Patch! For example: example: 133.Anless_over (100) # = & gt; 100 133. Nails_Over (150) # = & gt; 133 Note: I will not actually not this (I'll use your second example), but I'm guessing that this is a sense of question.

Handling threads in C# wpf application -

I am creating a C # wpf application with Visual Studio 2012. Text box is a two text box called Inbox and TextboxOptput. My job is when I'm typing in textboxInput, this description should be searched in real time in a text box output to find a database. Since it takes a moment, it slows down my typing speed which the user never wants. This thing happens when the user is typing "Foo", it searches for "F", then "fo" and then "foo". It has database entries for everyone, the user just does not want to see the details of "Foo" to others, but I can not predict where he will stop typing. I want to give him a smooth typing without cold. So in my Test Changed event I find it with a thread and if it comes to the Change Text Event (another letter type), it kills the previous thread and runs a new thread. My current approach. Private zero text boxoxput_TextChanged (Object Sender, Text ChangeEngenseAgages E) {//textBoxOutput.Text = sea...

How to implement a reverse mapping Java using lambdas? -

Image
As far as I know, in Java 8, the mapping works as follows For example: List & lt; String & gt; ObjList = Arrays.asList ("1," 2, 3, 4, 5, 6, 7); ObjList.stream (). Map (i - & gt; i) For every (i -> System.out.print ("+ i)"); Output: 1 2 3 4 5 6 7 But my question is: how Can I reverse mapping? Like Then it will be output 7 6 5 4 3 2 1 Or is it not possible to do this? In this example, I submit the list to one. Enters Linkedist (Double End Quote) which allows me to attach items to the last-in-first-out (LIFO) order. I store the collected method using Linkedist List :: Adjust that reads the item, close the section at the top of the list. public static zero main (last string ... args) {final list & lt; String & gt; ObjList = Arrays.asList ("1," 2, 3, 4, 5, 6, 7); Last list & lt; String & gt; Reverse = objList.stream () .collect (linked list: new, linked list: addFirst, linkedlist: addA...

Multiple Spring Batch jobs in one Grails application -

I have a Grails app that uses the Springbait plugin to control batch loading in the database. I will get two batch configs in a Grails app, let's call them at OneBatchConfig.groovy and DualCheck.groovy . They do very similar things, just with a slightly different processing. For example: OneBatchConfig.groovy beams {xmlns batch: "http://www.springframework.org/schema/batch "Batch. Job (ID:" Batch Job 1 ") {Batch.Step (id: 'Load file') {Batch.tkletkletlet {Batch.Cook (Reader: 'Filereader', Processor: 'Composite Processor', Author: ' DBRRIR ')}}} // file provider; For now composite processor (composite intprocessor) ignore the details of the filter (rep = [ref ('filter ivlidname'), referee ('filter inevidetments')] // filter * processor}} Doublebatch config.groovy beam {xmlns batch: "http://www.springframework.org/schema/batch" batch.job (id: "BatchJob2") {Batch.step (id: ...

cordova emulate android - qemu: could not load initrd '' -

I am compiling my first test app in my Linux mint Android Dev Virtual Machine, for example since I When I'm trying to emulate Android: Cordova emulate Android but it fails with it: qemu: iitrd loads '' I went away but did not find much about this problem. Actually I will solve my problem, then I realized that this issue is because it is an ARM processor. Trying to emulate and there is no kernel image to do this or to do nothing, so I am wondering why the ARM processor is why. Long story short, I had to go back to the Android Virtual Device (AVD) Manager and edit the Android virtual device and change the CPU / ABI from ARM to Intel Atom (x86) and now error The message has gone and Android emulation is loaded.

c++ - DirectX 9 window doesnt show -

I am trying to create a simple DirectX 9 program that creates a windowed window window and shows it (anything No window yet) When I compile the program, I do not get any errors. When I run the program, the window does not look and the program ends I / * * To create a Window Direct window with a simple DirectX 9 program that has nothing ready on it . There was no error during compiling or running, but a window * spread and the program almost stopped immediately. Include * / # & lt; Windows.h & gt; # Include & lt; D3d9 h & gt; # Include & lt; Time.h> # Include & lt; Iostream & gt; using namespace std; // Program Settings: CONST STRATT APPTITLE = "Direct 3D_Windered"; Const int SCREENW = 1024; Const int SCREENH = 768; // DIRECT 3D Object LPDIRECT3D9 d3d = NULL; LPDIRECT3DDEVICE9 d3ddev = NULL; Bull GamesNow = False; // Macro key press #define KEY_DOWN (vk_code) ((GetAsyncKeyState (vk_code) and 0x8000) 1: 0) * * Game initialization function *...

c# - What typeof(Page) Am I Navigating From? -

मूल पृष्ठ टेम्पलेट में, विधि नेविगेशनहल्पर_लोडस्टेट (ऑब्जेक्ट प्रेषक, लोडस्टेट एवेन्टएआरजीएस ई) {} । यदि (sender.GetType () == प्रकार (पिछला पृष्ठ)) {} काम नहीं करता है! मेरा प्राथमिक उद्देश्य यह जानना है कि कोड में साफ से मेरा डेटा कहां से आ रहा है। आपका विधि नेविगेशनहेल्पर_लोडस्टेट (ऑब्जेक्ट प्रेषक, लोडस्टेट ईवेंट एआरजी ई) {} को नेविगेशनहाल्पर द्वारा बुलाया जा रहा है और प्रेषक पास के रूप में काम नहीं करेगा नेविगेशनहाल्पर - कोई भी जानकारी नहीं है जिस पर नेवीगेशन पृष्ठ शुरू हो गया है। मुझे कोई ऐसी संपत्ति नहीं दिखाई दे, जिसमें आप यह जानकारी पढ़ सकते हैं, लेकिन आप निश्चित रूप से अपना पिछला प्रकार एक पैरामीटर के रूप में: // नेविगेट करना: फ़्रेम। नेविगेट (टाइपफ (पेज 1), this.ToString ()); // लक्ष्य पृष्ठ में: संरक्षित ओवरराइड शून्य ऑन नेविगेट किया गया (नेविगेशन एवेंट एर्ग्स ई) {यदि (ई.पैमिटर == टाइपफ (मेनपेज) .ओस्ट्रिंग ()) डीबग करें। Wrightite ("पिछला मुख्य पृष्ठ था"); }

Ruby colorize a section of text -

I am writing command line scripts in Ruby and I am trying to paint a color of lines. Currently, I am using the 'colorize' gem, but by documentation it only colors a line of text at a time puts "test". Colorize (: green) puts "test". Colors "(" green ") puts" test. "Colesize (green) But it seems something unnecessary to me and I would like to paint all the lines of text, but only Call once more and not color 3 times ('green'). How can this be done in Ruby? or (" green ") puts [" test "," test "," test "]. puts ["test", "test", "test"]. Map {| s | S.colorize (: green)}

C++ - How to find a (variable) character in a string? -

I need to find a user-entered letter in the loop. I usually But from here, 'E' will be a letter of four variables, I do not know that How to compare the price. I can not enter (sentence [i] == thechar) But I did not even create a variable to include the character How can I do this in this context? I do not have permission to use other, more effective, and more advanced methods. This is the basic course Please help! string word; Four letters; Cout & lt; & Lt; "Enter a word \ n"; Cin & gt; & Gt; word; Cout & lt; & Lt; "What characters do you want to search for? \ N"; Cin & gt; & Gt; Letter; (Int i = 0; i & lt; word.length (); i ++) {if (word [i] == letter) {cout & lt; & Lt; Letter & lt; & Lt; "Is" & lt; & Lt; I + 1 & lt; & Lt; "Character of" & lt; & Lt; The word & lt; & Lt; Endl; }} You can create a variable where you want to ask ...

c++ - Can Google V8 engine run different Javascripts in different contexts in different threads simultaneously? -

I plan to embed Google V8 in my C ++ application, which is a multi-threading process Need to run many javascript together? Can I create multiple V8 contexts and run different javascript in different contexts in different threads? Not every context needs to be communicated with others I just do not want any lock or wait for the script to be concurrently executed. Thanks! Yes, unless the references are from isolates of different isolates each isolated only You can enter one thread at a time and you need to use v8 :: Locker to isolate a specific thread.

How do I create a bare repo clone of existing git working repo -

I am the sole developer, I am working on a project with a local store under GIT. Now I need to create an unmatched repo for collaboration on the local network. How do I do this? git clone -l -bare old_repo_dir new_repo.git Note: If the plan is to collaborate on the web, then it may be better to just create a web-hosted repo and push the local to it.

javascript - How Fade-in and fade-out transitions between grid/list views? -

This content is meant to switch between grid and list views to display. How to add feed-in and feed-out changes or opacity while switching between grid and list views. Here's the : http://jsfiddle.net/9B4Lp/3/ (demo without transition) BSL to JSL: jQuery (document) .ready (function () {var $ box = jQuery (".post") , $ Bar = jQuery ("a.bar_view"); $ dat $ JQuery ("a.dat_view"); $ dat.click (function () {$ box.removeClass ("bar"); jQuery (this) .addClass $ Bar.removeClass ("active"); JQuery.cookie ("dat_style", 0); return false}); $ bar.click (function () {$ box.addClass ("bar") ; JQuery (this) .addClass ("active"); $ dat .removeClass ("active"); jQuery.cookie ("dat_style", 1); return false}}, if (jQuery.cookie ("dat_style") = = 0) {$ box.removeClass ("bar"); $ Dat.addClass ("active")} and {$ box.addClass ("bar"); $ bar.addC...

javascript - dojo how to overwrite event handler -

Currently, the dojo uses the on method to connect the event to the Hyndere. BTN = new button (); Btn.on ('click', function () {console.log ('do something');}); When the button is clicked it will call the attached function. However, according to the documents, the removal of existing handlers should be done in the following manner handler = btn.on ('click', function () {console. Log ('do something');}); Handler.remove (); It is not the way I want to delete the event handler. I do not handle handler anywhere but I want to add a new 'click' event btn.on ('click', function () {console. Log ('do something different');}); Change the existing 'click' event handler and add a new one. What do I want to achieve? Thank you! It is not possible, the framework refers to an event handler, as it does with jQuery's other frameworks are equal. There is a mechanism to remove all event handlers using...

android - How to optimize SQLite database fetching time -

I have 6384 records in my database and I am using the following query: SELECT T T_name, S.s_code, S.s_name, R.s_code, R.s_name, M.arrival_time, L.arrival_time, M.dest_time, MTNID, SID, RID from Trincilchudule M, Trencheschudual L, Train T, Station S, Station R, where S.S.name = 'Versova' and RS_Name = 'Ghatkopar' and M. Arrival-time & gt; '00: 00: 00 'and M. Arrival_time & lt; L. Arrival_time and MTNIID = LTN.ID and M.Dest_time = L.Edest_time and T.ID = MTNID and SID = M.Station_ID and R .id = L.Station_ID This query takes 8 seconds to fetch data. I have indexed my table, but the time is being taken only for 2 seconds. Schema: create table [station] ([ID] INTEGER tap primary key AUTOINCREMENT, [s_code] VARCHAR (10) not tap, [s_name] VARCHAR (50 Not faucet); Create Table TRAIN_SCHEDULE (ID INT, station_id INT, train_id INT, arrival_tile NUM, departure_time NUM, dest_time NUM); Create a table train (ID INT, t_name text); Train index idx_arri...

javascript - Embedding framer.js animation into html -

I am preparing an animated scroll for a landing page. I enjoy using, but I'm having trouble keeping framer layers on my webpage and be responsible for the browser size. This browser seems to work well for mobile prototypes rather than prototype. My solution was then designed to put the framer layer inside a div in the html and to respond to my CSS style. Unfortunately I can not find any way on this. I have tried to use jQuery and have added the layer to my div: app.js var container = new Layer ({background color: "transparent", width: 400, height: 400}); $ (Container) .appendTo (". Vertical_center") index.html & lt; Body & gt; & Lt; Div class = "vertical_center" & gt; & Lt; / Div & gt; & Lt; / Body & gt; I've successfully added random text so that it can check that jQuery is working. Has anyone used framer.js to create "property" that you can embed on your website? how so? is a ...

cql - Difference between partition key, composite key and clustering key in Cassandra? -

I am reading articles around the net to understand the difference between the following key types But I find it hard to understand that the examples will certainly help in better understanding. primary key, partition key, composite key clustering key There is so much confusion around it, I will try to make it as simple as possible. The primary key is a general concept to point to one or more columns used to retrieve data from a table. Make the primary key simple table stack overflow (main text, primary key, data text); This means that it is done by a single column. But the primary key aggregate (aka premises ), generated from more columns table stackoverflow (key_part_one text, key_part_two integer, to create data text, primary key (Key_part_one, key_part_two)); In the case of the primary key, the "first part" of the key is called PARTITION key (this example has a key_part_one partition key) and the second part of the k...

javascript - Move bottom circle of cylinder to the bottom -

I am creating cylinders in the canvas . Actually the cylinder was fine till the first time when I modified the cylinder's XY position. On the left I have changed the value in translation to both functions. Now I am confused how to take me from the bottom of the cylinder to the bottom Now towards the bottom of the cylinder towards the bottom increases. I have changed the code here: function draw cylinder (x, y, w, h, vRadius, fillStyle, strokeStyle) {var w2 = w / 2; Var h2 = h / 2; Var ytop = -h2; Var cpYtop = -h2 - vRadius; Var ybottom = h2; Var cpYbottom = h2 + vRadius; Ctx.save (); Ctx.translate (40, 90); Ctx.beginPath (); Ctx.moveTo (-w2, ytop); Ctx.bezierCurveTo (-w2, cpYtop, w2, cpYtop, w2, ytop); Ctx.lineTo (w2, ybottom); Ctx.bezierCurveTo (w2, cpybottom, -w2, cpybottom, -w2, ybottom); Ctx.closePath (); Performance Scare (Freestyle, Stroke Style); Ctx.restore (); } and function drawCylinderTop (x, y, w, h, vRadius, fillStyle, strokeStyle) {var w2 = w / 2; Va...

Adding PropertyChanged.Fody to Entity Framework Model.tt -

I am using unit framework 6 (model first). That's why I have many classes that have been prepared for me by model.tt. Here's my car square: // -------------------------------- ---------------------------------------------- // ; Auto generated & gt; // This code was generated from a template. // // Manual change in this file may cause unexpected behavior in your application. // code is reborn, then manual changes will be overwritten in this file. // & lt; / Auto-generated & gt; // ------------------------------------------------ ------------------------------ Namespace MyNamespace {Using System; Using System.Collections.Generic; Public partial car {public car} (It's Wiles = New Hashette & Wheel; gt; ();} Public Ink Car ID {Get; Set;} Public String {get; Set;} Public String Model { Get; set;} public string year {receipt; set;} public string VIN {get; set;} public virtual icon & lt; wheel & gt; wheels {receive; set;}}} I want to add other sect...

php - HTML a Tag Open new window And send POST value -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर मैं नई विंडो खोलना चाहता हूं , और पीएचपी फ़ाइल मूल्य को भेजें। जैसे & lt; a href = 'URL.php' target = '_blank' & gt; टिश लिंक है & lt; / a & gt; पोस्ट मूल्य कैसे भेज सकता है? संपादित करें: मैं पहले से ही & lt; form target = '_ blank' method = 'पोस्ट' एक्शन = 'code.php' & gt; & Lt; इनपुट प्रकार = 'छिपा हुआ' नाम = 'function_code' मान = '$ कोड' & gt; & Lt; button id = 'submit_button' type = 'submit' मान = '$ code' & gt; $ code & lt; / button & gt; & Lt; / प्रपत्र & gt; लेकिन लक्ष्य = _blank नए टैब खोला, एक पॉप-अप नहीं (नई विंडो) मैं 'नई विंडो & amp; खोलना चाहता हूं; पॉप-अप ', पोस्ट वैल्यू भेजें जब मैं बटन पर क्लिक करता हूं। इस तरह का हल & lt; form action =' # 'method =' post 'name =' fdata 'आईडी =' एफडीएटीए '& gt; &...

Access function in Matlab -

I would like to be able to use those functions whose code I can see, which is used in built-in multab functions Goes, but I can not call directly One of these tasks is checkdata . I can see the code of this function It is used in underlying macib functions such as gmdistribution.fit , but I can not call it directly by x = zero (5,5); You can not call the function checkdata because it is a personal function, to make the function a function private, you will see the function file in the -foulder A-M-1M-M-M 2.M folder private - You must store in a folder named code> Personal Personal Function 1.M - Personal Function 2.m Folder B - M3M. A 1 M and M 2. M private function 1. M and private function 2. M can call M. 3. M can not make any of these two personal functions. For more information go. However, if you want to use the checkdata , you can find checkdata.m and copy it to another folder.

configuration - SonarQube Import Project without Compilation -

I was thinking that without actually compiling the code it is possible to add a project to Sonakewich. So far, I've found the following ways to add sonarquitch: Ant / Mayen Eclipse But I There is no way to import source code without compiling. I currently have a lot of C / XML code review, but no compilation instructions (though the project is using VisualStudio anyway). Is it possible to use any kind of sonar client, just import a source code into a directory without compiling it in sonar. Is there any way to integrate Sonar Client with Visual Studio to import code into Sonakara? I do not think so. DLLs are not produced without compilation These DLLs require sonar to do any kind of analysis. So, what you are trying to do, it is not possible to achieve this.

c# - PIVOKE Stackimbalance error -

Hello, I was wondering what's wrong with this PINVOKE announcement? I have not found a mistake. This code is in C ++;); This is my announcement: [DllImport ("CppHookDll.dll", Charset = Charset.Auto, // EntryPoint = "? SetHook @@ YGHHHPAPAHWND __ @@@Z ", EntryPoint =" SetKeyboardHook ", ExactSpelling = true, Calling Convention = Calling Conference. STCOL) Public Static External Bull Sethook (Int hook type, bull bistle, [Marshal AS (unmanaged type. ] UInt32 dwThreadId, IntPtr hWndCaller); Thank you in advance. It seems that you are just importing the wrong function, the name of the function in unmanaged code SetHook is named , but you are importing a function named SetKeyboardHook . Probably there is a separate signature in the function SetKeyboardHook , which will explain the stack imbalance warning.

Extracting Data from Multiple TXT Files and Creating a Summary CSV File in Python -

I have a folder that contains 50 .txt files containing the data in the following format. === Forecasting on test data === inst # actual antitrust error distribution (OTDT19__lantation) 1 1: S2: R + 0.125, * 0.875 (73.84) I have to write a program that adds the following: my index number (i), letter of real class (rs or s), letter of prophecy class, and each of the distribution forecasts (less than 1.0 Decimal). When I finish it, I want to look like the following, but preferably one. As a Csv file id corrected SR1RR 0.125 0.875 2RR 0.105 0.8 9 3Ss 0.945 0.055. . . . . . . . . . . . . . . NSS 0.900 0.100 I am a beginner and a little fuzzy how everyone is involved after parsing and then inserted and added. Here I was wondering, but do not hesitate to suggest another direction if it is easy. For category (1, n) : s = str (i) readin = open ('mydata / output / output' + s + 'out', 'r') # files All have been given the same name but output = associat...

objective c - textField does not show in the alertView -

यहाँ मेरा कोड है: UIAlertView * theAlert = [[UIAlertView alloc] initWithTitle: @ "अलर्ट" संदेश: शून्य प्रतिनिधि: स्वयं रद्द करेंट्यूटन शीर्षक: अन्य कोई भी बटनटाइटल्स: @ "ओके", शून्य]; UITextField * textField = [[UITextField alloc] initWithFrame: CGRectMake (12, 45, 260, 30)]; [पाठ फ़ील्ड सेटबैकग्राम रंग: [UIColor clearColor]]; TextField.borderStyle = UITextBorderStyleRoundedRect; [TheAlert addSubview: textField]; [एलेर्ट शो]; [टेक्स्टफिल्ड रिलीज़]; [एलेर्ट रिलीज]; चेतावनी दृश्य में कोई पाठ नहीं है, केवल एक शीर्षक "अलर्ट" और एक बटन "ठीक है" आपका पृष्ठभूमि का रंग स्पष्ट है, इसलिए यह दिखा नहीं रहा है [textField setBackgroundColor: [UIColor redColor]] ;. और डिफ़ॉल्ट टेक्स्ट फ़ील्ड भी दिखाएं theAlert.alertViewStyle = UIAlertViewStylePlainTextInput; // या यूज़रनेम और पासवर्ड के लिए theAlert.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput; // या पासवर्ड के लिए theAlert.alertViewStyle = UIAlertViewStyleSecureTextInput; इ...

Google Tag Manager: gtm.dom and gtm.load are missing -

I am implementing the Google Tag Manager script on a client website. I get a random issue: the data line does not get its gtm.dom and gtm.load object. It has only two objects, a bunch of a variable with which I am passing and a data loaded event that I am pushing in. This issue is displayed randomly on different pages, sometimes the datelarer is filled correctly (Note: I apply javascript. Gtm configuration is done by an outside contractor) I found a solution here: I did not push my variable but assigning it to the data layer is overwritten, so gtm objects are unavailable.

php - Silverstripe 3.0 hide not allowed children from "add new" -

Silverstripe 3.1. * Pages which are not in the $ $ allowable child are disabled in the "Add New" menu. However, they are still showing in Silverstripe 3.0. If you want to create a page that is not allowed under selected parents, you receive an orange error notification: "Page Type" Mypage "is allowed as the child of this parent page I think this is a 3.0 point, you 3.1 Comparing the code and providing bridge requests for the 3.0 branch. The filthy workaround that works for you is to add the following line to the pages of your children, so that they can be allowed to build only the admin. Private static $ can_create = false;

yesod - Can template-haskell be used to generate quasi-quotes? -

A project on which I am currently working on consistently uses to make models To specify, instead of the semi-quoted dialect of constant , I would like to use json right now, i quasiquote which use constant simple template Hopes to use a script to generate it adds a weird step in the workflow Is this the template-haskell ? This can be avoided by currently being generated by the script: - File: ProjSpecific.Models shared [MkPersist sqlSettings, MkAmgrgr "Migrated" ] [Continued lauer cass | and - file: Prozecic How can this be done, but what is the best way to do this with what I am trying to do? Yes, it should be relatively painless You must essentially call the field persistLowerCase You want to use, which will give you the string - & gt; Q Exp . Use your preprocessor to convert JSON to the expected syntax, and then pass it to the function.

MySQL - How to do an Oracle RANK() OVER(ORDER BY score DESC) -

I'm familiar with Oracle and normally rank one () like this: Score | Rank -------------- 100 | 1 100 1992. 3 98 4 98. 4 98. 4 97 7 / I have not found a foggeet to do this in MySQL - after watching here, I have found: SET @prev_value = tap; Set @rank_count = 0; SELECT score, CASE WHEN @prev_value = Score then @rank_count WHEN @prev_value: = Score then Ranked as @rank_count: = Rank_con + 1Ed Rank ... But this Returns as follows: Score | Rank -------------- 100 | 1 100 1992. 2 98. 3 98 4 98. 4 97 5 That which I wanted was not the same. Add another variable: SET @prev_value = NULL; Set @rank_count = 0; SET @Rank_increasing = 0; SELECT score, @Rank_increasing: line_num as @rank_increasing + 1, case when @prev_value = scores again @rank_count WHEN @prev_value: = score then @rank_count: = @ rank_increasing as the AD rank ...

java - processing xml configuration documents in spring beans -

In our application we have some static XML configurations to access routes, an example of an XML file looks like: & lt; Configuration & gt; & Lt; Level value = "1" progress = "1" & gt; & Lt; Route destination = "one" & gt; BA & lt; / Route & gt; & Lt; / Level & gt; & Lt; Level value = "1" progress = "2" & gt; & Lt; Route destination = "one" & gt; Keba & lt; / Route & gt; & Lt; Route destination = "b" & gt; Cab & lt; / Route & gt; & Lt; / Level & gt; ..etc ... .. & lt; / Configuration & gt; On many occasions, we need to retrieve the value of the argument (s), it is argued that value , progress , And destination (all optional, all the routes should not have any argument). I know how to get it with XPath, but I would like to use it in spring bean, which I'm thinking like something The pre-> @ servic...

How to reverse an int in python? -

I am creating a dragon script which prints the '99 bottles the whole song of the bottle, but is inverted. The only thing that I can not reverse is the number, the integer is not the string. This is my complete script, def reverse (str): return str [:: -1] DERT plural (word, b): If B! = 1: return word + 'a': return word defline (b, ending): print be or reverse ('no'), plural (reverse 'bottle'), b), range (1 99 0, -1 ) Reverse (ending): line (i, "beer on the wall") line (i, "beer" print reverse ("lo I understand that my reverse function argument Takes a string as though I do not know how to take an integer, or, how can I change an integer later in the script You are conveying it in a very strange way. You already have a reverse task , Then why not line make the line line normal way ? def line (bottles, ends): "{0} { Return to "{2}." Format (bottles, plural ("bottle", bet les), closing) ...

python - Import error for Oauth -

I'm working on the same code on Python windows OK I was working with, to update this program, I can not update ImportError: name to_native_string can not be imported I can update it, it can help me to understand why this error might be Has been there. Traceback (the most recent call final): The file "c: \ user \ inn \ desktop \ tweepy2 \ tweepy1.py", line 1, set your Request version. is available after requests.utils.to_native_string request 2.0.0 . Upgrading request will solve your problem with the latest version. C: \ Users \ falsetru> PIP installation request == 1.2.3 to download / unpack requests == 1.2.3 ... Cleansing successfully installed requests ... C: \ Users \ falsetru> python -c "request Import__ative_string ".atils from" tracebacks (most recent call final): File "& lt; string & gt;", line 1, & lt; Module & gt; ImportError: name to_native_string can not be imported C: \ Users \ fa...

c# - DateTime format into SQL Server -

I am trying to insert a SQL Server database into a C # application. I am in C # using datetime.now to get the current date time: order.PendingDateTime = DateTime.Now; It gives me 25/07/2014 11:30:17 . The SQL Server table contains the datatype datetime . For example, 2014-07-23 14: 54: 01.607 keeps data as Although the value is going to be 25/07/2014 11:30:17 using a common inserted script it fixes in the SQL Server table but in the table 2014-07-25 11:30:17 Display as . (It's OK) However when I use (con) {con.Open ()) using SqlConnection ; (SQL Command cmd = new SQL Using Command ()) (Simdikknekshn = con; Cmd.CommandText = @sql; cmd.ExecuteScalar ();}} It Fails It says, A varchar data type is an out-of-range value as a result of a datetime data type conversion. This statement has been aborted. I think this is because Visual Studio 2010 and SQL Server have a different day for each other. Time format How do I fix this? Current code: st...

java - How to prevent multiple clicks on JComboBox -

I try to implement the mechanism, which is the number of clicks (I popup listener on JComboBox Uses) and prevents the incident being included for the audience. For example: Public square SomeClass {protected boolean semaphore = false; Public Zero InitComboBox () {JComboBox Target Controllerscombox = New JComboBox (); // Object targetControllersComboBox.addPopupMenuListener (New PopupMenuListener) {@Override Public Null popupMenuWillBecomeVisible (PopupMenuEvent event) {if (Semaphore == incorrect) {Semaphore = true // Here is semaphor // Here are some code // Semaphore = False; // released semaphor}}}} Before running the code in the popupListener I already executed before the popUplistener can execute the next popUplistener working from the user before Want to avoid run code in popupListener .. My example misfortune Can not help about this situation from anyone I can help to be very supportful UPDATE: FOLLOW (MARIS) RESLOVE PROBLEM: @Override Public Zero popupMenuWill...

c# - SharpDX: Method not found 'get_BufferPointer()' -

I created a simple SharpDX project from the tutorial on indieve (,). Now I found an error method 'IntPtr SharpDX.D3DCompiler.ShaderBytecode.get_BufferPointer ()' When I start the application. I have an article follwoing the SharpenDX dll: SharpDX.D3DCompiler SharpDX.Direct3D11 SharpDX.DXGI SharpDX This code is the main loop: running public zeros () {// ... initialize (); LoadContent (); RenderLoop.Run (renderWindow, () = & gt; {// ....} // ...} public override void Load content () {ShaderBytecode vertexShaderByteCode = ShaderBytecode.CompileFromFile ( "shaders.hlsl", "VShader" "(Peediacdi)," ps_4_0 "); Warteksshaider = new Warteksshaider (device, Warteksshairbitekod); // - & gt; error Pikselshaider = new Pikselshaider (device, Windows) PixelShaderByteCode); // ...} content shaders.hlsl: struct VOut {float4 position: SV_POSITION; float 4 color: cOLOR;}; Vioatti Visader (float 4 positions: position float 4 ...

java - Glassfish loads JavaScript files really slow (> 1 minute) -

I have a strange problem in my glassfish-web application. Most of the time, my index .jsp site loads really fast. But sometimes (especially after updating a new version of the application), I get a group of TimeOutExceptions in Glassfish. In the Chrome Developer Console, JavaScript files are 'pending' on the state, though .jsp and CSS files are loading very quickly, though. In fact, after 1 minute (or sometimes 1.5 minutes), most Javascript files are on '200', some of them remain 'unsuccessful'. After reloading the page, everything works fine. View screenshots from Chrome Permanent State: Thriving State: These errors appear on the glassfish: [# | 2014-07-25T13: 51: 12.321 + 0200 | Warning | Glassfish 4.0 | Javax.enterprise.web._vs.server | _ThreadID = 27; _ThreadName = Thread-7; _TimeMillis = 1406289072321; _LevelValue = 900; | StandardWrapperValve [default]: Servlet.service () servlet threw default exception java.io .IOException: org.glassfish.g...

Intermittent 403 response from django.contrib.auth.views.login() -

Using django.contrib.auth.views.login () for the user to process login I have a production environment Seeing the 403 response. The second attempt to login after the initial 403 (when this is the reaction). I have all 403 login failures have started the log, POST payloads and cookie values ​​capturing that csrfmiddlewordtoken (hidden form field values) and csrftoken (cookie value) do not match. It is intermittent and happens to many users. The following decorations are applied to the login function that is used to proxy: django.contrib.auth.views.login () function: @ Sensr_ csrf_cookie, @sensitive_post_parameters, @ Csrf_protect, @never_cache What could be the reason for this problem? . If you open a tab Login tab, log in using the other tab, if you submit the form to the original tab, you get a Sisarf error.

onclick - how to call java bean method at every click on button -

I have jsf component command buttons and I want to call the Bean method "Start ()" in each watch on this button But this code is called only once when the page is loaded with this code The code is here From: onclick - Clicking an indicator button on this element is executing the javascript code. If you want to do something on the server side, then Action Listener attribute. (And next time, you can put your code in question)

ios - Store UITableViewCell information into core data without segue xcode 5 -

I have a TableViewController and I have a UITableViewCell that can be expanded. When it is extended, I would like to save the data that was set with UIBarButtonItem, so this button will call a method for saving. I tried to save it in my ViewController implementation file but I always get an error: 'NSInvalidArgumentException', Reason: 'NSPersistentStoreCoordinator can not be made with a model' I have copied all the necessary code from another project in my app djlett implementation file which is a basic project using basic data. I also created my xcdatamodeld file with an alarm unit and seven features. I have also created an NSManagedObject class for the unit, in addition to that I have an Alarmcel in which I set the UITTel electricity property. My View Controller: The code is: - (IBAction) optionSet: (UIBarButtonItem *) sender {if ([_alarmOperation.title is equal: @ "save "]) [[Seven Alarmfinely]; }} BOOL monSet, tueSet, wedSet, thuSet, friSet,...