Posts

Showing posts from March, 2010

sql - Defining a view dynamically based on a table of table names -

Suppose I have a SQLite database, I'm adding regular views. Currently I have the following tables user, product, a, b, c to join me together a, b, and c one Using the scene. However, in the future, I would like to add more tables such as d and e , in this view, there is no way to define a scene so that it is dynamically Will these new tables be included? I think I will need to maintain a table of table names that I want to merge into this single scene, which is fine. This is not possible in pure SQL (SQLite has no ability to generate SQL dynamically from SQL And there are no triggers for table creation.) You have to create those sequences in those codes when you need them.

node.js - node, How to handle/catch pipe -

I have seen and read some tutorials which show that you can take a stream like a pipe and another Lego blocks , But I can not do anything to catch the pipe command while doing a stream pipe in an object. What do I mean by how I create an object with a function, so that I can do this: uploadWrapper = function (client, file, callback) {upload = function (client, file, callback) {var file = file // this.data = 'undefined' stream.WRitable.call (this); This.end = function () {if (this.Dataof this.data! == 'undefined') file.data = this.data callback (file.data, 200)} / var path = urlB.host ('upload' ) .object ('files', file.id) .action ('content'). Url // // client.upload (path, file, callback)} util.inherits (upload, stream. Proper) upload.prototype._write = task (piece, encoding, callback) {this.data = this.data + chunk.toString ('utf8') callback ()} new uploads (client, file, callback)} export.upload = uploadWrapper How do I get ...

PHP Curl Request with XML -

I can not understand for my life how to put XML formatting in string, even echoing the string While doing, $ data_string I am stripped of XML and only values ​​remain. Then I should be able to make a curl request through PHP with that string, I'm not. I'm sure that if I have the right setup for that code: $ data_string = '& lt; Test & gt; & Lt; Name & gt; John Doe & lt; / Name & gt; & Lt; Age & gt; 22 & lt; / Age & gt; & Lt; City & gt; Seattle & lt; / Age & gt; & Lt; / Test & gt; '; $ Curl = curl_init ($ baseUrl); Curl_setopt ($ curl, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ curl, CURLOPT_POST, true); Curl_setopt ($ curl, CURLOPT_POSTFIELDS, "xmlRequest =". $ Data_string); Curl_setopt ($ curl, CURLOPT_HTTPHEADER, array ("content-length:" strlen ($ data_string), "X-DocuSign-authentication: $ header". "Content type: text / xml", "accept: text / xm...

encryption - Error with my brute force password generator(Java) -

This is an assignment for the square, basically creates a method that can "guess" the password and then I can send it to another class. D-crypt file is a difficult part with me. import sussex.edu.cryptography; Public square final {public static zero major (string [] args) {// decryptter (); Cryptography crypto = new cryptography (); String Encrypted = "SourceFile_encrypted.txt"; String decrypted = "SourceFile_decrypted.txt"; String password = new string (); crypto.setPassword (password); If (crypto.isPasswordValid ()) {System.out.println ("found password:" + password); Crypto.decryptFile (encrypted, decrypted); } Else {// continue trying ...}} public static string decryptor () {char arrays [] = new characters [5]; Cryptography crypto = new cryptography (); String password = new string (); For (four c = 'a'; c and lt; = 'z'; c ++) {array [0] = c; (Four c1 = 'a'; c1 and lt; = 'z'; c1 ++) {array [1] = c1; For (...

Pasting into Access from Excel - Non-numeric entries don't get through -

Image
would complain about my access application for each losing once and a user field for a while I found that They are right. In some cases entry will only be left to accept data from a copy and paste operation for a certain area, continuously. This is almost as if the access thinks that the pasted data is only numerical data, then onces sees this alpha, it tries to put it in some number, then fails. The image below is not custom application, but there is a new access file, where I copy and paste excel data. I have seen using raw clipboard data, but I have not shown any obvious problems or format problems. Thoughts? a special paste operation to paste as plain text for ease of use, I have quick access to tools "tab paste Special 'button pin I recommend to do Sometimes access is achieved when you estimate what you're doing edit Example code for right click menu Public Function CreateGeneralClipBoardMenu () Error resume next CommandBars ("Gener...

python - Download under user's profile directory -

I have a hard time keeping that file, which I downloaded from inside the script to another folder. It will not make any difference but I am trying to update some programs remotely. I am able to download the file, but only in the folder inside the script. I need to run nininte.exe after downloading some command line arguments (i.e. silent), which I was going to pass this batch script I just would like to dump it into the download folder. When I hit it on Google installing Python in a specific folder. Here is my code import urlib ninite = urllib.urlopen ("www DownloadSite.com") localFile = open ('ninite.exe', ' Wb ') localFile.write (ninite.read ()) ninite.close () The script works very well but when I open the folder location localfile = (' % Userprofile% / downloads / ninite ',' wb ') then it returns an error that there is no file or directory with that file. You can use environment to expand the variable such as % userprofil...

python - Trying to create n*m matrix -

Trying to create Board (2, 3) whose As a result [[nobody, none, no one], [none, none, none]] However, I only have 6 none Usually, this is done: def none_board (n, m ): [[None] for the [[Range (M)] for the code in the range (n)] L1 + = l1.append (l2)

asp.net mvc 4 - MVC4 DropDownListFor not selecting passed value -

@ html.DropDownListFor (मॉडल = & gt; मॉडल [i]। सूचना प्रकार, नई सूची & lt; SelectListItem & gt; {नया नई SelectListItem {Text = "Boat", Value = "03"}}, "-" चुनें selectListItem {Text = "Car", Value = "01"}, नई SelectListItem {Text = "Home", Value = "02"}, -नोन - ") उपरोक्त मेरे दृश्य में एक ड्रॉपडाउन सूची बनाता है, लेकिन यह देखने के लिए दिया जा रहा मूल्य पर नहीं खुलता है। यह हमेशा - - - कोई भी चूक नहीं है। ध्यान दें कि मेरा मॉडल एक IList है साथ ही, क्या मुझे इन मॉडल को अपने मॉडल या डेटाबेस में कोडिंग करना चाहिए? अगर एक अन्य मूल्य जोड़ा जाता है, तो मैं अपने कोड को पुनः कंपाइल करना नहीं चाहूंगा, लेकिन मैं ग्राहक को हर बार एक ड्रॉपडाउन खोलने के लिए डेटाबेस कॉल करना नहीं चाहता। आपको चुने गए आइटम को सेट करना होगा: नया चयनएलआईटीम {टेक्स्ट = "नाव", मान = "03 ", चयनित = @ मॉडल.SomeValue.Equals (" 03 ")} यह नियंत्रक में सूची संग्रह बनाने और इसे देखने के लिए ...

Android Gridlayout is not resizing and placing itself in the center of the screen -

Image
I'm not sure why my grid layout is not visible in the center of the screen, besides, I want to change it again So that it can fit any screen on any device I use. Here I am using XML to create my own UI: & lt; GridLayout xmlns: android = "http://schemas.android.com/apk/res/Android: layout_width =" match_parent "Android: layout_height =" match_parent "android: layout_gravity =" center "Android: stretchMode =" columnWidth "Android: UseDefaultMargins = "true" android: columnCount = "4" & gt; Spinner Android: id = "@ + id / selectplayerDropdown" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: layout_columnSpan = "4 "/> & Gt; ImageView Android: id =" @ + id / imageView0 "Android: layout_row =" 1 "Android: layout_column =" 0 "Android: background =" # C0C0C0 "/> gt; & lt ; Imag...

ios - Returned value in delegate -

मुझे प्रोटोकॉल और init पद्धति के साथ ऑडियोव्यू क्लास मिला @protocol AudioViewDelegate & lt; NSObject & gt; - (शून्य) प्लेबटन एक्शन: (आईडी) प्रेषक; // (1) - (शून्य) playButtonActionforAudioTrack: (AudioTrack *) ऑडियोट्रैक; // (2) //// - (आईडी) initWithFrame: (CGRect) फ़्रेम फ़ॉर ऑडियोट्रैक: (ऑडियोट्रैक *) ऑडियोट्रैक withButtonTag :( Int) बटनटैग ऑडियो ट्रैक के साथ मैं कक्षा init मेरे पास प्ले बटन है और फिर मैं स्क्रीन पर इसे टेप करता हूं, विधि में प्रतिनिधि में (1) मुझे टेप बटन का प्रेषक टैग मिलता है। मैं प्रतिनिधि ट्रैक में ऑडियो ट्रैक को ट्रैक किए गए ट्रैक के लिए कैसे वापस कर सकता / सकती हूं? ================================== वर्ग @protocol ऑडियोविवेडिलेगेट & lt; NSObject & gt; - (शून्य) प्लेबटन एक्शन: (आईडी) प्रेषक; - (शून्य) playButtonActionforAudioTrack: (ऑडियोट्रैक *) ऑडियोट्रैक; @end @ इंटर्फ़ेस ऑडियोव्यू: UIView @property (nonatomic, strong) UILabel * audioTitle; @ प्रॉपर्टी (नॉनैटोमिक, मजबूत) यूआईएलबल * अवधि टाइटल; @ प्रॉपर्टी (नॉनैटोमिक, ...

sql server - SQL Update Two Identical Tables -

Image
I have two identical tables that need to be updated on a daily basis. Both tables have the same structure. If they have 100+ columns, is there a way to update all the columns based on tablebine without writing a (set column name = '') update statement for each column in SQL? Both tables have the same column names, so I thought there might be a clever way of doing this. This is a little hack but it can be done. I have created two identical tables with every 2 records. (Table_1 and Table_2) Table_1 Table_2 SQL: DECLARE @ LEFTTABLE VARCHAR (MAX) = 'Table_1'; DECLARE @RightTable VARCHAR (MAX) = 'Table_2'; DECLARE @UpdateStatementVARCHAR (MAX); SELECT @UpdateStatement = COALESCE (@UpdateStatement + ',', '') + 't2.' + COLUMN_NAME + '= 1.' INFORMATION_SCHEMA.COLUMNS from COLUMN_NAME, where TABLE_NAME = @ LiftTable and COLUMN_NAME & lt; & Gt; 'Id' SET @UpdateStatement = 'UPDATE T2 SET...

security - Inner workings of Git integrity check -

After reading, and seeing a little bit on git source, I have a question that the internal work of GIT Integrity Check. Reference claims that it is not possible to reduce git to learn about GIT without it. In addition, git stores are in the form of snapshots instead of deltas, so there is no cross dependency which I know in the hash value. So my question is, is it possible that it is possible to remove the last commitment (without deleting the code) without anybody, without even knowing about the git is? How to commit somewhere in the middle? Every git object is identified by any one. This is a cryptographic checksum of the object type and content. ID 5f95c9f850b19b368c43ae39 9cc831b17a26a5ac : tree 9 72825cf23ba10bc49e81289f628e06ad44044ff Parent 9c8ce7397bac108f83d77dfd96786edb28937511 Author Juno C Hamano & lt; Gitster@pobox.com> 1392406504 -0800 Commutator Junio ​​C. Hamano & lt; Gitster@pobox.com> 1392406504 -0800 Git 1.9.0 Sign-Off-By: Junio ​​C. Ham...

Turning a Rails AssociationRelation into a CollectionProxy -

कहो मेरे पास ये कक्षाएं हैं: class zoo & lt; ActiveRecord :: बेस है_माइं: जानवरों के अंत वर्ग पशु & lt; ActiveRecord :: बेस; Belongs_to: चिड़ियाघर अंत वर्ग शेर & lt; जानवर; अंत वर्ग बाघ & lt; जानवर; अंत मैं आसानी से a_zoo.animals कर सकता हूं लेकिन इसके अतिरिक्त a_zoo.animals & lt; & lt; A_lion_or_a_tiger । मैं क्या करना चाहता हूं सीधे एक चिड़ियाघर के लिए शेर और बाघों विधि को सक्षम करता है। मैं आसानी से पुनः प्राप्त कर सकता हूं: डीआर शेर जानवरों। जहां (प्रकार: 'शेर') # शेर के लिए समान # समापन, मेटाप्रोग्रामिंग के साथ सामान्यीकृत किया जा सकता है # लेकिन अभी इसमें कोई आवश्यकता नहीं है लेकिन मुझे संशोधनों के साथ एक कठिन समय आ रहा है I यही है, a_zoo.lions एक एसोसिएशन रिटर्न देता है, जबकि a_zoo.animals एक CollectionProxy देता है, जो कि अब तक अद्यतन करने योग्य है जैसा कि मुझे ये मिल रहा है। मैं a_zoo.animals की सभी कार्यक्षमता को a_zoo.lions और में स्थानांतरित करने के लिए क्या कर सकता हूं? A_zoo.tigers ? आप has_ma...

java - JComponent not displaying on JPanel using GridBagLayout -

So after some research I am leaning towards specifying the size of my JComponent First hand, JComponent is not actually a preferred shape naturally. Should I add a preferred size with my JComponent to my panel? And if there is a way to fix this problem then what is the best way to do this? Ive read different people using setPreferedSize and others are saying that you should not use this method at all. import java.util.Scanner; Import javax.swing.JFrame; Import javax.swing.JPanel; Import javax.swing.Timer; Import java.awt.event. *; Import java.awt.GridBagLayout; Import java.awt.GridBagConstraints; Import javax.swing.JLabel; Import java.awt.Insets; Import javax.swing.JTextField; Import javax.swing.JButton; Import java.awt.Container; Import java.awt.ComponentOrientation; Public category array (static int [] array; Fixed int [] Sorted; Public static zero main (string [] args) {int size = 0; Scanner = new scanner (System.in); // Ask for the size of the array until the user...

objective c - How can frameworks used by a static library be automatically imported on iOS? -

My company creates a stable library for iOS apps, an annoying step for developers is that they use all of the libraries It has to be linked manually to the necessary frameworks, and failing to do so conflicts errors. I had first thought that it was not possible, but the company claims to be like a chartbost advert and storekit. Based on my trial based on my sample app (available from the linked page), this seems like a case so far (whenever there is a link between static library in the "Enabled Modules" and "Automatically Link Framework" app it happens). / P> Is there any way to enable this feature while creating a stable library? I have tried to enable the module in Xcode and the "Link Framework Automatically" LLVM option but have not been able to work it yet. CBDynamicallyLoadedDependencies is a piece of code that calls Call the appropriate system library before making the dlopen () function or method. My original answer was not co...

max - Maximum profit using Dijkstra Algorithm -

Diskstra algorithm is one of the fastest algorithm to solve the shortest path problem. In my case the network is made of nodes where the burden of the shore gives me the advantage. I was wondering if I can reverse the algorithm of Dijsastra to solve this problem, but I realized what happened if we go in a closed loop (because the cost will increase further, it will increase forever Will be). I know how to solve it as an integer programming problem so that I can verify the accuracy of the algorithm (and unfortunately not correct). Here is the pseudo code for Bistroscope which I am using. What is the correct revision? ln = â ???? for all, ???? {s}, ls = 0 nâ ?? ² = {s}, nâ ?? ²â? ² = â ???? Repeat n = argminnâ ?? ²ÃƒÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, ¢? ²lnâ ?? ² nâ ?? ² = nâ ?? ²â ???? {N}, â ?? ²Ã ¢? ² = Nâ ?? ²â ?? ²A for all (N, M) for AA ?? N {N} is not with M ?? ²²²²² if LM & gt; LN + CN, M then LM = LN + CN, M NA? ² = NA? ²² ?? End {end} to end {n}? In other words, an effective ...

android - AndEngine - TimerHandler not providing contact between bodies -

I am making a jumper game responsible for living in jumping jump platforms. I start playing with my character and 3 platforms. The next platform I randomly generate with a timer handler is almost ready, but IM is facing some problems with a timer handler. I use the platform (stationary body) using it spawn platforms in every second. Private zeros addplat (int x, int y) {platform = new platform (x, y, vbom, physics world); AttachChild; } Private Wide CreatePlatSpawn () {Float MFFactSpace Dele = 1F; PlatSpawnTimerHandler = New TimerHandler (mEffectSpawnDelay, true, new ITimerCallback () {@Override Public Zero onTimePassed (TimerHandler pTimerHandler) {platformList.add (forums); if (platformList.getLast () Gety ()> = 240 & amp; & Amp; platformList.getLast () of Gety () & lt; 400) {yCoord = (int) (platform.getY () - addNumber.nextInt (160)); else if (platformList.getLast () Gety () Of & lt; 240. & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp...

javascript - Angularjs creating a div grid from a list -

I'm new to AngularJS and I'm trying to create the following structure: & Lt; Div class = "zone" & gt; & Lt; Div class = "line-fluid" & gt; & Lt; Button ID = "BTN 94" class = "SPAN 4 BTN" & gt; All zones & lt; / Button & gt; & Lt; Button ID = "BTN 95" class = "SPAN 4 BTN" & gt; Region 1 & lt; / Button & gt; & Lt; Button ID = "BTN 9 6" class = "SPAN 4 BTN" & gt; Zone 2 & lt; / Button & gt; & Lt; / Div & gt; & Lt; Div class = "line-fluid" & gt; & Lt; Button id = "btn97" class = "span4 btn" & gt; Zone 3 & lt; / Button & gt; & Lt; Button id = "btn98" class = "span4 btn" & gt; Zone 4 & lt; / Button & gt; & Lt; Button ID = "BTN 99" class = "SPAN 4 BTN" & gt; Area 5 & lt; / Button & gt; & Lt; / Div ...

asp.net - Error in converting aspx page to html (itextsharp 5.0.6) -

I convert this aspx page into pdf by using this code itextsharp 5.0.6: use MS = new memorystream () HTML as dim HTML string = VBCR & amp; VbLf & amp; "& Lt; h1 & gt; h1 & lt; / h1 & gt;" & Amp; VbCr & amp; VbLf & amp; "& Lt; p class =" "bo" "& gt; one paragraph & Amp; VbCr & amp; VbLf & amp; "& Lt; ul & gt;" & Amp; VbCr & amp; VbLf & amp; " A & lt; / li & gt;" & Amp; VbCr & amp; VbLf & amp; & Lt; li & gt; Two & lt; / li & gt; " & Amp; VbCr & amp; VbLf & amp; Three & lt; / li & gt; " & Amp; VbCr & amp; VbLf & amp; "& Lt; / ul & gt;" String = Render Controlling Structure (Page) New Style Sheet () styles as dim HTML1 dim styles. Overall Style ("Bow", "Size", "10") Style. Load tag style (HtmlTags.H1, HtmlTags.FONT, "59...

css - Strange Chrome image resizing behaviour -

Image
When the window is resized, I have some strange behavior with Chrome about image resizing. When Chrome has broken the fullscreen in Windows (Double-click on the window to snap a full screen), and I unzip the window, due to which it will take back the previous shape , Which was unassigned to it, the images are not being properly scaled. For example, I have the following CSS code that gives images size 100% of the space, and the width of the self: img {height: 100% width: auto; } When the window fullscreen is broken, it looks fine, the aspect ratio of the pictures is kept but now if I unzap the window (double click) the size of the height will change , The width will not be the same as: Internet Explorer In this way, looks like an unassipping: Does anybody know why Chrome is not properly shaped? Or is there something wrong with my CSS? If you need more code, please ask. Thank you. Use width instead: 100% - & gt; Max-width: 100%; I was once before this i...

android - Using multiple SQL databases -

I'm creating an Android app that will download XML data from my website, parsed XML data is inserted in 5 separate SQL Will Light Table I have successfully logged into my website, got XML data & amp; Pars I'm not sure how to layout the database code for multiple tables (opening, closing, insertion, selecting) In addition, I would like (it is possible ) To stay on the device these tables need to be logged out and then come back to the app. p> The title of the question is called "multiple databases," the body "several tables "I call it" multiple tables " Use SQLiteOpenHelper to create all the tables in onCreate () on SQLiteOpenHelper on a single table In the same way do open / close and CRUD operation. Use a search engine to find a tutorial about SQLiteOpenHelper case required.

file io - Reading 32 bit binary numbers in java -

I am trying to read five 32-bit binary numbers. I am reading 1, 5, 8 and 45 properly, but I can not read 134,217,728. My code is as follows: FileInputStream file = new FileInputStream ("C: /Sn3.edf"); BufferedInputStream buff = new BufferedInputStream (file)) {int in; For (int i = 0; i I tried to change int for a long time but did not work. Any help is appreciated You did not post a complete code example and you did not have your input file The content was not posted, but it goes anyway. According to JDK docs, BufferedInputStream.read () returns a byte at a time. You are reading a byte at a time, storing it in in , and printing it in the console. This code will work only for you if your number is 8 bits in size. Since you have a 32-bit integer file stored in it, you will need to read 4 bytes in one time (32 bit / 8 bits / byte) and then do some math to get those bytes in Java int .

sql - Give a list of all employees, fname, lname and dept, who make more than the average in their building -

but only if they work in the creation of 400, 402 or 405 Fname, lname, employees recruited, where building = 400 and building = 402 and building = 405; So if I get the AGG, then I have to figure out which numbers in SQL or what, can I use the AVG () function to find the answer? I think to use the subquery, but do not know how, help! select fname, lname, where employee (400,402,405) and salary & gt; (Where average salary from the employees' building (400, 402, 405)); Whereas the "salary" employee makes the column is Besides, your statement is wrong, I have edited for you. Outside the subject question: Are you working in human resources and trying to find some officers who earn more to others, the company said to reduce the cost?

java - Can scala code compiled with JDK 7 run on JVM 8? -

I have a project for many microservices scans I'm planning to go to Java 8, but Graydale Scala Due to the limitation of the plugin and the compatibility between Scala and Java 8, those micro services will still be compiled on JDK 7. My question is whether they will run on JVM 8 without any modifications or specific configuration? Scala 2.11 which is still in progress, is not yet compatible with Java 8 bytecode. Although JVM 8 is backward compatible, so long as you are compiling your Scala code on JDK 7 and you drop it in JVM 8, then everything will work fine. Maybe not applicable to you, but the latest Scala works only with JDK6 + 6, so nothing less than JDK 6.

Wordpress Slider with source images from PHP -

I need an image slider for Wordpress, in which the image com is PHP, behaving something like this: [slider] & lt ;? Php get_slider_images (); ? & Gt; [/ Slider] echo the lines like get_slider_images () with & lt; Img src = "xxxxx.jpg" title = "dummy title" & gt; Does anyone know the appropriate plugin (or any other solution)? Note: I did my search, but nothing could be found. Thank you! FlexSlider options: $ parts = enter in your image URL Do; $ Description = '& Lt; div class = "flexslider" & gt; & Lt; Ul class = "slide" & gt; '; Foreign currency ($ Part $ portion) {$ description = '& Lt; Li & gt; & Lt; IMG height = "200" width = "342" src = '$ part "& gt; & lt; / li & gt;"; } $ Description. = "& Lt; / ul> "; jsfiles

python - How to run Flask-SuperAdmin example at local host? -

I'm learning the Flask web app I I got a flask extension named Flask-Superadmin with Gitub I have already reprimanded it, but I do not know how to run a flask-super admin instance on the local host. / P> Thank you! You do not need a fork to run it; If you want to make a change in it or want to fix the bug in it To install it, use the standard Python installation tool: pip install flask -SuperAdmin Then, start Read the documentation to help you do it.

javascript - collision detection fabrics js -

I am using clothes js, I use the following function to put an image on the canvas, when I If I click on the canvas then keep an image in that place, I should know that there is no way that I can check the weather, some place already exists where I am specifically clicking if someone else Whether the image is or not document.getElementById ("door"). Onclick = function (canvas.On ('mouse: down', function (o) {fabric.Image.fromURL ('http: // localhost: 60099 / images / door.png', function (IMG) {var pointer = Canvas.getPointer (oe); logo = img.set ({left: pointer.x, top: pointer.y}) canvas.ed (logo); canvas.itm (objc). LockmovementY = true; canvas.itm ( OBJC). LockMovementX = true; canvas.reader ();});}); } Can be detected with clothes. Js 'intersectsWithObject' function Consider their 'intersection' example:

java - Spring inject mocked Bean -

मैंने एक रिपॉजिटरी के आधार पर एक सत्यापन बाधा बनाई है। सार्वजनिक वर्ग PersonValidator ConstraintValidator { @ स्वामित्व निजी व्यक्ति रिपोजिटरी व्यक्ति रिपोजिटरी; @ ओवरराइड पब्लिक रिक्त इनिशियलाइज़ (पर्सनवैलीटाइटर व्यक्ति वैलिडेटेटर) {} @ ओवरराइड पब्लिक बूलियन हैवालिड (व्यक्ति व्यक्ति, संयतवास्तविक कंटेंट संदर्भ) {वापसी नल! = रिपोजिटरी.फिडबायनाम (व्यक्ति.गेटनाम ()); }} मान्यकर्ता का परीक्षण करना PersonValidator का मजाकिया करना आसान है, लेकिन उदाहरण के लिए सत्यापन संदेश को जांचने के लिए मैं सत्यापनकर्ता के साथ एकीकरण का परीक्षण करना चाहता हूं। सार्वजनिक वर्ग PersonValidatorTest {@ एटोवायर निजी वैलीडेट सत्यापनकर्ता; @Test सार्वजनिक शून्य एकीकरण () {व्यक्ति व्यक्ति = नया व्यक्ति (); person.setName ( "व्यक्ति"); सेट करें & lt; ConstraintViolation & LT; व्यक्ति & gt; & gt; बाधा विरोधाभास = सत्यापनकर्ता। वैधता (व्यक्ति); Assert.assertEquals (0, बाधाओं का उल्लंघन।) ()); }} मुझे नहीं पता कि कैसे PersonValidator अंदर सत्यापनकर्ता को मोकोर्ड रिपॉजिट...

loops - Resizeable Number Triangle in Java GUI -

I have this assignment for Java class which I am taking. I was assigned to do this: Write a program that displays the numbers shown below. The number of lines in the display is changed to fit the window as the size of the window. This is displayed in GUI (without large space between lines): 1 12 1234 P> 12345 1234567 The larger the number of the counting and the number of lines that is going up, the more I am using the GUI Expand window. Now in my code: import javax swing *. Import java.awt. *; Public class resizing GUI JPNL (public Input width = 600; public intensity height = 200; public int x_coord = 10; public int y_coord = 40; public static final int point_ size = 12; public font font object = new font ("sanssirf" Font.plain, point_size); public integer maximum number = 16; public recycling (super); setSize (width, height);} public zero color (graphics g) {superpant (h) ); G.setFont (fontObject); X_coord = 10; Y_coord = 40; Int lineCount = 0; in...

swing - Window not wanting to run on something that should run in java -

I am working on a program with a friend and do not want to walk because there is only one item error in the program, Window, and this does not show an error or a fix to it. This is my dirst time on the stack overflow code: package example package; // Import Import java.awt.FlowLayout; Import javax.swing.ImageIcon; Import javax.swing.JFrame; Import examplepackage.GetFilepath; Public category starter {public static zero main (string [] args) {GetFilepath FP = New GetFilepath (); Jeffram Win 1 = New Geoffram ("Windnam"); win1.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); Win1.getContentPane (). Add (Win1, FlowLayout.LEFT, FlowLayout.LEADING); Win1.pack (); Win1.setVisible (true); Win1.setLocationRelativeTo (win1); win1.setIconImage (new IMP (FP + "\\ window \\ main"). getImage ()); }} this line: win1 getContentPane (). Add (Win1, FlowLayout.LEFT, FlowLayout.LEADING); It does not make sense that you are trying to add a component to yourself (??...

C Structure holding a pointer to another structure how access member of that inner structure pointer -

संरचना इस तरह दिखती है typedef struct _PROCESS_INFORMATION {हैंडल एचप्रक्रिया; हैंडल hThread; DWORD dwProcessId; DWORD dwThreadId; } PROCESS_INFORMATION, * LPPROCESS_INFORMATION; Struct PLAYER {/ * 0x0 / 0 * / struct PROCESS_INFORMATION * प्रक्रिया सूचना; / * 0x4 / 4 * / अहस्ताक्षरित लंबे डीवर्ड 4; / * 0x8 / 8 * / अहस्ताक्षरित लंबे dword8; / * 0x सी / 12 * / अहस्ताक्षरित लंबे डॉर्डन सी; // ... बहुत सारे फ़ील्ड यहाँ हैं यहां TerminateProcess के लिए प्रोटोटाइप है BOOL WINAPI TerminateProcess (_In_ HANDLE) एचप्रक्रिया, _In_ UINT uExitCode); मैंने इनमें से सभी को नीचे और विफल करने की कोशिश की। अहस्ताक्षरित int v102; // निकास कोड संरचना खिलाड़ी * खिलाड़ी; // eax @ 9 TerminateProcess (खिलाड़ी-> ProcessInformation-> hProcess, v102); टर्मिनेक्ट प्रोसेस (प्लेयर-> प्रोसेस इंक्रोकेशन .प्रक्रिया, वी 102); टर्मिनेटप्रक्रिया (* (खिलाड़ी- & gt; प्रक्रिया सूचना) - & gt; एचप्रोक्रेस, वी 102); तीर - & gt; प्लेयर के अन्य सदस्यों के लिए काम करता है लेकिन अ...

c++ - boost::hash odd behavior on RHEL 5.4 64bit -

I've written a simple code to promote: hash behavior, source code as: #include & lt; Iostream & gt; #include "boost / functional / hash.hpp" namespace myns {size_t get_hash (double V) {boost :: hash 1 For hash 4607182418800017408 has 4607182418800017408 for hash1 is 4611686018427387904 for hash 3 4607182418800017408 hash2 is 4613937818241073152 Scenario # 2: In the debug build (the same compiler), the output is: For hash is 4607182418800017408 for hash1 4607182418800017408 hash2 is 4611686018427387904 hash1 for 4607182418800017408 hash3 for 4613937818241073152 hash2 Or is 4,611,686,018,427,387,904th make What release behavior normal? In scene # 1, the hashes of 1, 2, 3 are the same, and the hash of 1 is different for running 3 times! How can I get it working properly in Debug Build? Can someone give me some light? Thank you. The GCC option line is: G ++ - Phone-call-exception-O2 -i / main.cpp is included in this, if I remove the fnon-call-exceptio...

java - Opinion on best Data structure for sorting Objects by type, which are non-sequential Integers? -

I will make it as simple as possible: I have an ArrayList (person class) of objects. There are many variables in the objects, one of which is called the reps. To paint the scene picture, I want to sort these objects into buckets, where each bucket is a separate repad (they are not sequential, so it can be 1,2,5,7,8. .) Therefore, all the objects are stored in the same residual same redid. Why is the reason why I want to call DB for each representative. I want to sort them by redial, then repair Only receive information once dB, then operation using again and description of DB through all objects involved in the rape. I was thinking of something like 2 dimensional ArrayList, the first dimension is based on integer numbers and the second dimension is individual objects, although I do not know how big the second dimension is. I will create the shape of the first dimension on the basis of the basic structure of the persons, then I want to add each object to the object, because they...

javascript - Disable Next Page button until all radio button groups have been answered -

I have not been responded to all the three groups of radio buttons, as long as a "Next section" button is disabled I'm trying to find out. I've searched for the length of the solution, but most are when a form is submitted. I am trying to configure it so that buttons are enabled when all questions are answered. There are three panels on this page, only one is visible at a time. When the panel appears one, the panel two and three are hidden, once the answer on all the questions on the panel, the user clicks on the "Next Section" button, which slides up one by one, and the section two Slides. The problem I am facing is the verification ... make sure that all questions are answered on each panel before enabling the button. I have a very brief version of what I'm working with: Q1 I think this is what you need: code> $ (q01, q02, q03) .change (valid); is not a valid way to select three jQuery elements . You can use the func...

How to implement aggregate in erlang MongoDB driver -

I am trying to use it with the total This is what I have tried so far mongo_query: command ({db, angle}, {gross, gt; & gt; pipeline, & lt; & lt; "{$ group: {_ id : {$ Sum: \ "$ id \"}}}, {$ Project: {_id: 0, id: \ "$ id \"}} "> gt; & gt;} wrong). but I receive this error ** exception error: {bad_command, {errmsg, & lt; & Lt; "Exception: Wrong type for field (pipeline) 2! = 4" & gt; & Gt; Code, 13111, OK, 0.0}} I am having trouble moving forward and I am looking for any help. Just to be clear, I am trying to apply it db.users.aggregate ({$ group: {_ id: "", id: {$ Sum: "$ id"}}}, {$ Project: {_id: 0, id: "$ id"}}); which works in the Mongoody Shell. I can postpone someone who knows that if someone has cried so far, But there is no one: I think you are supplying a string for the pipeline argument where the driver is expecting a list.

python - How to have a multiple select field in django in the form of a drop down box -

Any help is greatly appreciated, I'm a newbie in the DJ. class studentRegister (forms.Form): courseList = forms.ModelMultipleChoiceField (queryset = course.officeSoul ()) Thank you and appreciate your time , I just want to modify this type of form so that I can choose two or more options at one time and return it to the list? I think you can use the SelectMultiple widget. class studentRegister (forms.Form): course list = forms.ModelMultipleChoiceField (queryset = course.objects.all), widget = form. Select multiple) If it does not meet your needs, then you can try to use it.

sonar runner - Having trouble getting started with SonarQube -

I have installed the sonarqueb and sonar-runner, and the web server works just fine because I can browse it Tried to keep things as simple as I could, I put the "sonar-project.properties" file in the source folder of my project and gave it. In sonar form After the source has done this, the console output reported success and the web page lists the date of my project and the final analysis, but when I went into the "Compare" tool to see the statistics, all the things are empty Shown from number 0 I have edited the sonar -project.properties file to give the source code of my project full path (instead of its relative current directory path), by changing the backslash with forward slash, from the command line The sonar-runner command is working again while the working directory was the path to my source folder. It was again reported to be successful and when I reloaded the web page, it updated the date of the last update, but again no problems were found and the ...

tfsbuild - TFS Build can't find bin/Debug folder in MSDeploy task -

First of all, if I build the project using MSBuild through the command line then it works without any losses . Am I able to determine that the source code is being generated for contentPath TFS is running. & lt; Target name = "deployRemote" & gt; ; & Lt; Exec WorkDirectory = "$ (MSDeployPath)" command = "msdeploy.exe -verb: sync - source: contentPath = & amp; quot; $ (MSBuildProjectDirectory) \ bin \ debug \ & amp; quot; ... & lt; / Goal & gt; TFS Errors: EXEC: FileOrFolderNotFound EXEC: type 'contentPath' and object of path 'C: \ one \ src \ MailChecker \ MailChecker \ bin \ debug \ 'can not be created. Exec: Could not find a part of the path? \\ \ C: \ a \ src \ MailChecker \ MailChecker \ bin \ debug \ EXEC: 1. Note: This target targets the creation of MSBuild post (which is initially commented in your csproj file) It is said within the Is that TFS bin \ debug might be using a different produc...

Entity framework, map oracle database type number(10) to .net Int32 -

With the field type number (10) in the Oracle database, which is larger than the net. Net int 32 range. I am now using the Entity Framework to get data from this table, and map it to the database unit of this table. But, when I get the data, I get this error: var competitions = DB PKG_API_PORTAL_SP_GETFBCOMPETITION () ToList (); The type of the main field is expected to be "System.Int32", but the value provided is actually 'System.Int64' type. I got this question And this article is how Datatype has been translated But now I want to solve this problem Solution is needed. I am assuming that because you are using dotconnect for Oracle with EOF that you get the function from the function. A refresher is returning / SP whose project is being projected on Datatype. You have three options to fix the problem: 1- Type in the object that you are mapping to Int64. This is the easiest solution if you are using an entity developer, just select the type in ...

java - The forked VM terminated without saying properly goodbye. VM crash or System.exit called -

Please help me solve this problem. I do not know exactly what the error is in the log. [INFO] ------------------------ ------------- ----------------------------------- [INFO] Failure [INFO] -------- ------------------------------------ -------------- -------------- [INFO] Total Time: 21.74 9 s [INFO] Expired: Thursday 24 April 10:10:20 IST 2014 [INFO] Last Memory: 15 M / 37 M [INFO] ------------------------------------ ---------- -------------------------- [Error] Target org.apache.maven.plugins Failed to execute: Maven-surefire-plugin: 2.15: Test on project sample (default-test). Simple Forwarding: Execution of the Target Default-Testing org.apache.maven.plugins: maven-surefire-plugin: 2.15: The test failed: the finished VM ends properly called VM crash or System.exit without saying goodbye? [Error] Command wascmd.exe / X / C "\ Program Files \ Java \ jdk1.7.0_55 \ jre \ bin \ Java" -Xmx1024m -XX: MaxPermSize = 256m -jar E: \ OpenDayLight \ controller \ opendaylight ...

recursion - Removing data from list pointed to by a pointer in C -

I'm trying for a time without a random way to delete a node (anywhere in the link list) Is it possible ?? This is my non-recursive method that does not work: int removeItem (struct ListNode ** headRef, int data) {struct ListNode * temp = * headRef ; // store original head int val = data; While (temp-> Next! = Faucet) {if (temp-> Next-> Data! = Val) {temp = temp- & gt; next; } And if (temp-> next-> data == wal) {temp = temp-> next; Free (temporary); Return 1; } And {return 0; }} Return 0; } I honestly do not believe that I follow this question, but this what are you trying to do? int removeItem (struct ListNode ** headRef, int data) {if (! * HeadRef) 0; If ((* headRef - - Data! = Data) returns return item (& amp; (headRef) -> Next, data); // found it. Leave it to the composition ListNode * tmp = * headRef; * HeadRef = tmp- & gt; next; Free (tmp); Return 1; } And if so, no . It is better to do this work through repetition (it...

html - How to make my iframe's javascript accessible to other sites? -

I am applying a media player type that other site developers can embed on their website. I have to provide them a set of JavaScript functions that they can call from other parts of their website. I have a SVF file with an external interface, so I want to load it in an iframe. How can I make javascript accessible out of my IFrame? I looked at the X-frame-option but this permission-to-command does not work with Chrome and Safari What are my options? This is the HTML5 way to do this. If you can not trust being used in your HTML5 environment, (A) that is really sad, and (b) you can use.

linux - c program hangs/loops when "sudo -s" command is executed -

I am currently writing a program that will run multiple command (in one line) in CLI with C. The first order I need to run is sudo -s . So I go out to test this command alone if the program is running, but the program is hanging while running this command. I wanted to know whether the problem is program or order, so I ls Run This program works perfectly when I run the ls command, I think that there is something wrong with the sudo -s command, There is a need to do something with which This is the job that runs in CLI int executeCommand (char * command, char * result) {/ * This function runs the command . / / / / * Return value is the command * / int nSuccess = -1; FILE * fp = NULL; Four buffer [1035]; If (command == NULL) render ("command is empty"); If present (result == faucet) ("the result is zero"); If (command! = Null & amp; result! = Null) {fp = popen (command, "r"); If (fp! = NULL) {strcpy (result, "\ 0"); While (FATS (...

c# - When I try to use a variable in an if() it says that I am using an unassigned variable -

स्ट्रिंग x1; Dispatcher.Invoke (नई एक्शन (() = & gt; x1 = lbl1.Content.ToString ())); (मैंने ऐसा किया क्योंकि मैं धागे का उपयोग कर रहा हूँ) (तब जब मैं इसे किसी एक में उपयोग करने की कोशिश करता हूं) यदि (x1 == " एक्स ") {} (मुझे यह कहने में त्रुटि मिलती है कि मैं एक असाइन किए गए वैरिएबल का उपयोग कर रहा हूँ) क्या कोई मुझे बता सकता है कि ऐसा क्यों हो रहा है? देखें: स्ट्रिंग x1; // & lt; - बस घोषित, निर्दिष्ट नहीं किया गया / x1 को सौंपा गया है, लेकिन अलग थ्रेड में Dispatcher.Invoke (नई एक्शन (() = & gt; x1 = lbl1.Content.ToString ())); // यह हो सकता है, कि अलग धागा अभी तक समाप्त नहीं हुआ है, और // x1 अभी भी अनअसाइन किया गया है; इसलिए, संकलक चेतावनी दिखाता है कि यदि (x1 == "X") {} कुछ मामलों में, हालांकि, संकलक जो सिर्फ असाइनमेंट का पता लगाना , जैसे स्ट्रिंग x1; एक्शन एफ = () = & gt; {x1 = "एक्स"; }; च (); // & lt; - x1 को यहां सौंपा जाएगा // कंपाइलर ग़लती से यहाँ चेतावनी देता है कि x1 अनअसाइन किया गया है, लेक...

How to install magento in subsfolder of localhost -

Image
I am installing magestrone from our server to our local host. I think that I've successfully gone through the process though, CSS and JS files are trying to refer to the root of the local folder, instead of the sub folder where it has been installed. I have executed the following two SQL commands with no effect from core_config_data where path = 'web / cookie / cookie_domain'; Update Core_config_data set value = "http://127.0.0.1/xxxx/web/" where path = 'web / secure / base_url' or path = 'web / unsecure / base_url'; I have also removed everything inside the var. Please find two images to show issues after changing admin password , I'm the administrator Was able to log into Nubhag. But CSS and JS files (alias skin files) still try to reference from http: //127.0.0.1/skin ... While it should be http: //127.0.0.1/xxx/web/skin/ ... System Web Asus / secure Aadhar URL is also inaccessible since ...

java - regex for even no. of single quotes -

Image
I'm trying to find 'more', even after this. Quote of single (') and replace it with' OR ', I am trying to regex it in java, but there is no luck till now for example company = Expected Output: Company = 'Sam' '' S & Joseph '' 'S' or Year = '1998', 'Sam' and 'Joseph' 'S' and Year = '1998' / Pre> Single quotes are not considered even within double quotes, while no number is counted for. Out of single quotes Then the above output will be retained in the first 'and' and will be replaced by the second place 'or' . We can use the following regex (can only be calculated before ' " ). \ Band \ b (?: (?: [^ '] * [^' ']') {2}) * [^ '] * $)

css - PHP Function creating a link at bottom in Footer -

I am using a widget license under the GPL and want to remove the footer link. You can see How to edit this function to delete more links Msls_init function () {// $ code = 'Pjaghazlzrz0iaHR0cDovL3d3dy5rZXlzdG9uZWFldG9sb2Fucy5jb20iPmFldG8gbG9hbnM8L2E +; PGEgaHJlZj0iaHR0cDovL3d3dy5rZXlzdG9uZWF1dG9sb2Fucy5jb20vYmFkLWNyZWRpdC1hdXRvLWxvYW5zLyI + YmFkIGNyZWRpdCBhdXRvIGxvYW5zPC9hPg ==; PGEgaHJlZj0iaHR0cDovL3d3dy5rZXlzdG9uZWF1dG9sb2Fucy5jb20vYmFkLWNyZWRpdC1hdXRvLWxvYW5zLyI +YmFkIGNyZWRpdCBjYXIgbG9hbnM8L2E +; PGEgaHJlZj0iaHR0cDovL3d3dy5rZXlzdG9uZWF1dG9sb2Fucy5jb20vdXNlZC1hdXRvLWxvYW5zLyI + dXNlZCBjYXYgVxV0byBsb2FuczwvYT4 =; Pjaghazlzrz0iaHR0cDovL3d3dy5rZXlzdG9uZWFldG9sb2Fucy5jb20vdXNlZClhdXRvLWxvYW5zLyI + Dksonlzkbjiksigbg9hbnM8L2E +; PGEgaHJlZj0iaHR0cDovL3d3dy5rZXlzdG9uZWF1dG9sb2Fucy5jb20vdXNlZC1hdXRvLWxvYW5zLyI + dXNlZCBhdXRvIGxvYW5zPC9hPg ==; PGEgaHJlZj0iaHR0cDovL3d3dy5rZXlzdG9uZWF1dG9sb2Fucy5jb 20vdXNlZC1hdXRvLWxvYW5zLyI + dXNlZCBjYXIgbG9hbjwvYT4 =; PGEgaHJlZj0iaHR0cDovL...

php - Working on Google+ Integration -

400 यह एक त्रुटि है त्रुटि: invalid_request device_id और device_name निजी आईपी के लिए आवश्यक है: / मेरा स्थानीय होस्ट आईपी / एक्सआईज़ / एक्सवाईज़ /googlegoogle_login_oauth/index.php क्या कोई मुझे यंत्र आईडी और नाम की जांच कर सकता है? अनुरोध का विवरण: scope = https: //www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo। ईमेल response_type = code access_type = ऑफ़लाइन redirect_uri = http: // स्थानीय होस्ट आईपी / --- / --- / google / google_login_oauth / index.php अनुमोदन _प्रॉप = बल client_id = --------- मैंने एक Google+ वेब ऐप बनाते समय इस स्थिति में भाग लिया है, लेकिन जब मेरी जावास्क्रिप्ट उत्पत्ति और रीडायरेक्ट कॉन्फ़िगर किया गया है एक निजी आईपी पते पर यूआरआई (जैसे 198.168.1.24)। ऐसा लगता है कि Google+ आईपी पते पसंद नहीं करता है, यह पूरी तरह से योग्य डोमेन नाम चाहता है। यह देखते हुए कि मेरा घर रूटर डीएचसीपी प्रदान करता है और मुझे एक पूर्ण योग्य नाम देता है (उदाहरण के लिए mycomputer.attlocal.net) , Google कंसोल क्रेडेंशियल्स पेज में मू...