Posts

Showing posts from January, 2014

MySQL Show records of current user + users that he is a parent of -

How can I go about writing a MySQL code to get the record of the current logged in user and at the top of it, The user that he is a parent? user_id | Username Parent_user_id --------- + ------------ + ----------------- 1 | Alvin | Zero 2 Gary 1 3 Tom | 1 We enter the user Alvin and the basic MySQL statement ... ... (Pseudocode) selects the order related to this Alwin. WHERE user_id = $ _SESSION ['loggedUser'] by order SELECT * command I would like to know about writing a statement which orders from Gary and Tom Also displays (Definition defined in relation between parent, user's desk? Or lack of restricted word to look like a team leader / leader of a better leader. * Also want to add That order table only stores information and a user name field st To thank the user Many thanks! Try it out: SELECT commands from WHERE user_id = $ _SESSION ['loggedUser'] or user_id IN (user select user where parent_user_id = $ _SESSION ['loggedUser'

spring - import resource is not working -

Image
I have just started learning spring, it is easy to create multiple classes and values ​​in the spring configuration files Constructor RGR or Setters What if I will reference the property of any other configuration file, then my simple program considers two classes of user and vehicle and two spring configuration files to FirstBean.xml and SecondBean.xml and an app class . The main method is as follows - Directory structure - user.java - package com.common; Public class user {public string user name; Public vehicle vehicle; Public user () {} public string getUsername () {return user name; } Public Zero Set USUN (String Username) {this.username = Username; } Get Public Vehicle () {Return Vehicles; } Public Zero Set Vehicle (Vehicle Vehicle) {This. Vehicle = vehicle; }} Vehicles. Java - package com.common; Public category vehicle {The name of the public string vehicle; Public vehicles () {} public vehicles (string aerodynamics) {super (); This.vehicalname = veh

javascript - Radio buttons to change iFrame not working -

I'm pretty sure I correct it, I'm using the wrong function, but: & lt; Script & gt; Go to Function (People) {document.getElementById ('iframe'). src = loc; } & Lt; / Script & gt; In the login details container, iframe which is selected through the page radio button (How do I select the first radio button automatically?) & lt; div class = "loginins_details_container" & gt; & Lt ;! - Top Container - & gt; & Lt; iframe id = "iframe" src = "home_schedule_iframe.php" width = "100%" height = "100%" & gt; & Lt; / Iframe & gt; & Lt; / Div & gt; & Lt; Div class = "iframe_container" & gt; & Lt; Form & gt; & Lt; Input type = "radio" name = "iframe" value = "type" onselect = "go ('maths_iframe.php')" /> Mathematics & lt; Br> & Lt; Input type = "radio" name = "

ios - UIPopupViewController, frame is dark after keyboard displayed -

Image
मैंने निम्नलिखित समस्या देखी है मेरे कोड में मैंने UIViewController को 'UIPopoverViewController' में प्रदर्शित किया है। इसके अलावा मुझे नोटिफिकेशन मिलता है जब कीबोर्ड दिखाई देता है, गायब हो जाता है। आकार बदलने के बाद I आईओएस 7 और आईओएस 6 पर उपस्थिति में अंतर देखते हैं। आईओएस 6 पर प्रदर्शित फ्रेम काला हो गई मैं दृश्य के लिए कहीं भी कोड पृष्ठभूमि रंग में नहीं बदलता। Pls मुझे समझाने के लिए कि एक मामले में कम से कम दृश्य सही क्यों दिखता है (आईओएस 7) और अजीब लग रहा है (आईओएस 6) आईओएस 6.1 सिमुलेटर - गलत परिणाम IOS 7.1 सिम्युलेटर - सही परिणाम < / p> ठीक है मैंने संभव समाधान का पता लगाया इस समस्या का समाधान करने वाला कोड यहां दिया गया है: 'UINavigationController * navController = [[UINavigationController alloc] initWithRootViewController: Ñ ?? onroller]; [UIPopoverController alloc] initWithContentViewController: navController]; ' लेकिन, ईमानदारी से बोल रहा हूं, मुझे क्यों नहीं मिलता .... नेविगेशन नियंत्रक को पॉप अप के लिए प्रारंभिक नियंत्रक के

php - Passing result from Model to Controller dependant on result in Codeigniter -

The best way to do this can not be to get my head - I have a model that adds a product for shopping The car is; $ this-> Db- & gt; Choose ('*'); $ This- & gt; Db- & gt; ('Product'); $ This- & gt; Db- & gt; Where ('product_id', $ PID); $ Query = $ this- & gt; Db- & gt; get receive (); $ Products = $ query- & gt; Result_are (); $ Stock = $ product ['0'] ['stock']; $ Quantity = 2; $ Cart = $ this- & gt; Cart- & gt; material (); $ Found = wrong; Foreign currency ($ cart $ item) {if ($ pid == $ item ['id']) {If ($ item ['quantity'] + $ quantity & lt; = $ stock) {$ this- & Gt; Cart- & Gt; Update (Array ('queued' => gtc: $ item ['queued'], 'qty' = & gt; $ item ['quantity'] + $ quantity); $ found = true; $ message to send message Added}} and {$ found = true; $ send message is not telling enough stock}}} if ($$ == incorrect) {$ data = array

java - Counting the number of times an element occurs in a given column for a 2D array? -

This is a method for a Sudoku game. Can anyone explain their thinking processes to this? :( I am having difficulty finding this, I know for the first method, we have to use a loop or something. I know that for my method my walking is wrong ... Sorry: ( private int countOccurrencesInCol (int col, int d) {for (int i = 0; i & lt; grid.length; i ++;) {for (int j = col; j = col) ; j ++;) {if (grid [i] [j] == d) {count ++;}}} Return count;} This method is a given column Returns the number of numbers in a 9 x 9 matrix. Private int countPossiblePlacementsInCol (int col , int d) { In this method, to determine the number of places is considered a given column where the numbers can be kept and the number of those places can be returned, Where a number can be placed on a given position for a given column. If the digit is already there, the method returns 0. Here are some code to help you understand the essential approach: privat E int countOccurrencesInCol (int col, i

video - iCloud accounts + my server accounts + linking -

I am working on an iOS project where a user will be given a chance to record the video. These videos will be part of the user's account. User account information such as name, email, avatar image, video list etc. will be saved in my server. Since my client is buying low storage space in the server, it does not want to have video files in the server (each video is only 20 seconds). So I came up with using iCloud storage space for video saving. Now user accounts in the app comes from two places 1. User Meta Data - My Server 2. Recorded Video - iCloud Server Now I have a few questions about how iCloud accounts can be managed with the server account. How do I link an iCloud account with a server account? When a user changes the user's iCloud account, but uses the old server account then how to handle it. How does the user agree to save video files in iCloud, How to handle when iCloud exits the memory. Does anyone who has worked on iCloud answer me these types of

.net - Crystal Reports - objRpt.SetDataSource() -

I have created a new crystal report that is called the IW1 and CrystalReportViewer1 object on my form, and to show it to everyone A highly defined dataset uses a record in the table which is working fully though I am now trying to limit the results to show the records based on only 1 SQL selection statement. But I am getting an error on the runtime below Crystal Reports. Error received ... System. Io Filnotfesakseshn was unmanaged HResult = -2147024894 message could not be = load file or assembly 'file: /// C: \ Program Files (x86) SAP BusinessObjects \ to \ .NET Framework Crystal Reports 4.0 \ Common \ SAP BusinessObjects Enterprise XI 4.0 \ win32_x86 \ dotnet1 \ crdb_adoplus.dll 'or one of your dependencies The system can not find the file specified. Source = name mscorlib file = file: /// C: \ Program Files (x86) \ SAP BusinessObjects \ Crystal Reports for .NET Framework 4.0 \ Common \ SAP BusinessObjects Enterprise XI 4.0 \ win32_x86 \ dotnet1 \ crdb_adoplus.dll Fu

ios - SUBQuery NSPredicate -

I have an array of dictionaries, in which the phone number is a key, { Email = "ryuiioo @ uioo.njk"; First name = Dry; Last name = Sam; Midnight = S; phonenumbers = ({home = 3452345345; main = 4985739804; mobile = 3567567741; other = 5769875698; test = 2290834709; test = 9336664648; function = 4523523453; iPhone = 3453245234;}); Record id = 66; } I am searching the array with this string " stringToSearch " This way I am trying to get the first name while searching NSMutableArray * allPredicatesArray = [NSMutableArray new]; NSPredicate * firstNamePredicate = [NSPredicate predicateWithFormat: @ "SELF.Firstname Begins [c]% @", StringTouch]; NSArray * firstNameFilteredArray = [self.recordsMutableArray filtered application user: firstname]; [All PaddicantesAreAdd ObjectFrammayre: InitiativeFilterAir]; Now, can I predict the "mobile" number search using NSpredicates " phonenumbers "is an array , so you have to use"

visual studio 2013 - cocos2d building in WIN7 vs2013 -

I am a learner of cocos2d-x, an open source game engine. But in the beginning when I would like to open the file Coco, I had to face these problems D: \ game studio \ cocos2d-x-3.0rc0 \ cocos \ audio \ proj.win32 \ CocosDenshion vcxproj: error: æ ?? ½ ½ ½ ½ i ? ¥ one ?? £ (Unable to perform this operation, this interface is not supported) and the rest 16 others. Cocos 2D-X Edition: Cocos 2D-X v3.0r IDE: Visual Studio 2013 Dependency: Python 2.7 < p> I was told that to solve this problem my basic structure can be restored but in vain Cosos2d-x v3 supports Visual Studio 2012, see: < / P> >

css - rotating div on y axis in I.E -

I am trying to rotate a div on the y axis using the transmitter but it is not supported in IE, therefore I use filters as follows Filters: Prozed: DXImageTransform.Microsoft.BasicImage (rotation = 1); But still I can not do it to rotate on the y axis .. Anybody can help me find a way to rotate it in IE. Here is the code It seems that you are trying to rotate around the Y axis, Which is a 3D change Unfortunately, PROJECT: DXImageTransform.Microsoft.BasicImage (and progid: DXImageTransform.Microsoft.Matrix for that case) do not support 3D changes Your code should work in IE 10 or above, but you may have to add an additional css line to your stage function for " -ms-transform ". I think I can link to the documentation about the 3D changes in IE, but I have found very little of it.

javascript - Modifying the function from Bootstrap plugin typeahead.bundle.js without modifying actual js file -

I want to add some extra code to the function body, without actually modifying the file, the '_select' function. When I console the Typeahead object to see the hierarchy, I am unable to track the exact location of the '_select' function. In Chrome, the console shows the function under the 'node', I do not know what it is. So I would like to know how I can give a new definition of '_select' function. My guess is that you can override with it: typeahead.prototype._select = function () {console.log ("changed it");} Underscore indicates that selection is private and should not be directly or overridden . Selection in future releases - Something can be completely different or not at all, so your code will break.

Estimote multiple beacons -

I see this question Estimote: Finding and starting multiple beacons with ESTBCON Regions? And it seems that people are aware of it, but it crashes my app. What was created and an example of an array in use? If someone can provide this bit code, then I'm sure many people would appreciate it. This is Wojtec borridge, I am a community evangelist in Esteemot. Please refer to this thread on our community portal: It has been explained in detail and with examples of code. Hope that helps Cheers.

python - Django load objects instances just once, make them available starting app -

I have an app (Django 1.6) that uses 4000 objects for naturally processing (NLP) Was previously generated. All application processes (requests, tests, custom management commands, etc.) need to use all those items in some way. All I have to do is load those objects, only once, at the startup moment (or so), and store them in memory to make them available for all app operations. There are some clues in it, but I would love to hear your thoughts. What is the best way to position clarification : 4000 objects only all Used for reading in the processes, they are not being modified in any way in the app. / p> Thanks a lot. Take advantage of all the data and also the Memcached cash backend. Therefore, any of your processes can be accessed fast, secure, and easily.

java - SimpleClient - GET request -

I have received this training work in my school, which says: "Change the simple client" so that this GET request Archives the contents of a given address on the command line and the file's response to the disk. Import java.net. *; Import java.io * *; Public category SimpleClient {public static zero main (string [] args {try} socket cone = new socket (args [0], integer .Portset (args [1]); PrintStream Out = new printstream (con.getOutputStream ()); Out.print (args [2]); Out.write (0); // Mark at the end of the message. Flush (); InputStreamReader = new InputStreamReader (con.getInputStream ()); Int c; While ((c = in.read ())! = - 1) System.out.print ((four) C); con.close (); } Hold (IOException e) {System.err.println (e); }} As far as I want to make the "cone" example of the socket connection to the host via a port (www.google.com like ARG [0]) number (Args [ 1]) Then a printstream is made "out", but what is the function of the out. Print (AGR

ios7 - How to view value of segue.identifier in debugger? -

Image
I have a breakpoint at the bottom of the line if . This code is ViewControllerOne Is in. The push is ViewControllerTwo . Once the breakpoint hit, how can I see the value without using segue.identifier using NSLog ? When I hover over the identifier, nothing is up. Hovering on sec simply displays a NSObject in the debugger. - Create (void) ForSegue: (UIStoryboardSegue *) segue sender: (id) sender {if ([segue.identifier isqualToString: @ "submitButtonToSeque"]) {AAViewControllerTwo * destinationViewController = segue .destinationViewController; }} Using a NSLog I can see the value output in the debugger. But I would like to avoid the NSLog . Set a breakpoint if statement As you type in the console, Intelligence will help you complete automatically: The command is PO & lt ; Object & gt; :

android - App installs tracking -

itemprop = "text"> I am making my own Android app. I need your help: I ​​was thinking about promoting it through a type of "share" on various social networks My app needs to track me with this problem that the user Where did I download my app? For example: A user receives a friend from FB via a link from his app on Google Play Store, then the user clicks on it and is redirected to the app's page. Is there any way to learn from clicking the app from a user's link? I should know this :) Hopefully I explained my problem :) All for help: D < div class = "post-text" itemprop = "text"> If you look at the available metrics for your page's insights in your app, then it can be meaningful: Some "special values "Which can be done with interest: Perhaps it is as worthwhile to keep an eye on it here: If you are reaching people once in your app, you can get a fb_source Uua L parameter will appear. Official do

Return index position in array based on a partial string in Python -

मान लें कि आपके पास एक सरणी p : p = ['0', '9', '10', '13'], ['1', '8', '10', '14'], ['2', '7', '9' '' 3 ',' 2 ',' 8 ',' 18 '], [' 4 ',' 1 ',' 7 ',' 19 '], [' 5 ',' 1 ' '' 2 ',' 20 '], [' 6 ',' 2 ',' 4 ',' 21 '], [' 7 ',' 1 ',' 3 ',' 22 '], [' 8 ' '' 4 ',' 6 ',' 25 '], [' 9 ',' 3 ',' 5 ',' 26 '], [' 10 ',' 5 ',' 6 ',' 27 '], '' 11 ',' 8 ',' 10 ',' 28 '], [' 12 ',' 7 ',' 9 ',' 31 '], [' 13 ',' 1 ',' 2 ', '32 ['14', '4', '6', '33'], ['15', '3', '5', '34']] मुझे आंशिक स्ट्

osx - QLThumbnailImageCreate broken in Mavericks? -

I have a code that previews 'some' file, this coco runs threaded in the desktop app CFRRF URL = CfURLCreativeWheelSystemPath (zero, (CFFR) filpath, KCFRPPOSISXPathStyle, Incorrect); If (url) {cgImage = QLThumbnailImageCreate (zero, url, inSize, (__bridge CffFFF) option); CFRelease (url); At 10.8 (and I think 10.9.0 and 1) I will get a real render - the equivalent of pressing the space bar in the finder, but now I only get a pidy icon or zero. In other words if you For a file in 10.9, you press the spacebar in the finder, you see the file content, but the QLThumbnailImageCreate taps. Has anyone else seen this? So it has been found that by removing the app TextMate 2 (April 2014 version) (which I use I solve this problem. TextMate seems to have a bug in its Quicklook generator An example of someone running in the bug.

How to stringify the values of json search for content in rethinkdb -

I have a document like this, I want full text search ( values ​​ only) Is it possible to change the object in the string in the RirthCAD? I have to do something like the r.table ('x') ('description'). It includes ('Commonwealth') I do not know if there are many or who will be children. So first convert all the values ​​of the single node into a string and then search the text (or other way). Thank you. {"Description": {"parlist": [{"listitem": {"text": {"bold": "their", "child": "Barriers are the best hope Pars Dave "," If ":" Commonwealth Crows Fill the Duke Wench Captain Lineville Wellness Brother Gray "}}}}} This should work, but it is probably not super efficient r.table ('x'). Filters (Doctor) {returning doctor ('description)') .Corate to ("STRING"). Match ("Commonwealth")})

SharePoint: Someone leaves the organization but must remain in list -

We have a list of people that have a "person or group" column in the list that is against Active Directory (AD) Validate the person. Since someone has recently left our institution, he is now inactive in the ED. As a result, while maintaining its SharePoint list record, its name is no longer valid and in order to save the record, we have to remove our ad username. Now we have a record that is no longer connected to any person. Of course, we can make the name field as the original text, but management does not like that Eddie verification is not supported by entering text. Is there any way to get the best of both worlds? We want ED to compel former employee user accounts from our SharePoint list because those employees record historical purposes. I have seen this work in only one way that it will actively leave the person in ED But they are put in a special group, which has been refused permission to login. Thus they keep an active record in the context of Share

associations - rails find_by: get the first item by adding the reference key as parameter -

I am new to rail and I am creating a quiz application. I have one set up between the two models: the union and affiliates have union: level and question. #model / levelRb class level & lt; ActiveRecord :: Base has has_many: question end # model / query. Rb class question & lt; ActiveRecord :: Base is_to: level attr_accessible: level_id end I have 'startlevel' in a LevelController that lists all the levels. Class Level Controller & lt; ApplicationController def startlevel @levels = Level.all end and to go to the first question at the scene level with the link. I want to add the level ID as a parameter of the link. I saw 1 in the URL seen. I do not know how it came and why it is part of my problem. # controller / level / startlevel / 1 lieutenant; H2 & gt; At what level do you want to play & lt; / H2 & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; Th & gt; Level & lt; / Th & gt; & Lt; / TR & gt; &

ios - Is it possible to dynamically extend an NSProgress hierarchy after progress has started? -

I have some hierarchy of NSProgress objects for simplicity, say a basic progression with 2 children If progress has already begun, then can I add progress to another child in the hierarchy and hope to be right? For example, I start with 2 children, so the root is totalUnitCount is 2 and is a pending unit code 2 . Once the first child completes the root progression, ' fractionCompleted will be 0.5 . If I then add another child's progress then updates the '' fractionCompleted to ~ 0.33 , but the root of the totalUnitCount remains on is. > 2 , as pending code does. I can manually update totalUnitCount but it turns off the fraction integer of the route, except without calling There is no way to become. Currently designation unit number: . Was not designed for this type of use or is there a "proper" way of doing this? My use case is that I have an application that can upload files to Remote Server. Users can select some files and p

python - Using Twython to pull all (of Miley Cyrus') tweets? -

I'm new to Python and Twiton, but I'm working on a project where I use Twython I want to analyze everyone. Mali Cyrus's tweets are currently 7,193, but Twython will only take me 200 at a time ... how can I scrape them all? Is there a way to scrape them all using Twinthon or do I have to manually check out the Twitter website? Ideally, I keep access to all Tweets metadata so that I can use it in my analysis (rather than just the text of all the tweets). Tips for code? If you, you will see that: This method only applies to users Of the recent tweets, up to 3,200 are refunded. There is no way that the API can be used to return all the historical tweets to the program. And, yes, you are limited to request 200 requests at a time.

defining getters/setters in an object literal with a self-invoking function javascript -

It is possible to use a self-encoding function when defining an object so that the function has access to a private variable , obj = {value: (function () {var personal; return function () {back true;}} ())}; But is it possible to do the same thing with a waiter / setter in the object? obj = {get value () {return value; }, Set the value (v) {value = v; }}; Not really you have made IIF for obj Can: obj = function () {var privateatething = 'hithere'; Return {Get value} (back privatization)}, set the value (v) {privatething = v; }}; } (); obj.value; // = & gt; 'Hello'; obj.value = 'Good morning to you too'; obj.value; // = & gt; 'You too good morning'

linux - Password for GitLab -

I have installed GitLab. The instructions state for adding "git" to the user adduser --system --shell / sbin / nologin --comment 'GitLab' --create-home - I was then looking forward to all the work I added a project to the GitLab server, and she instructed me to push it: cd current_git_repo git Remote add-origin git@mysite.com: root / bidjunction.git git push -u original master Then I reach my client's GIT server was to. [Michael @ Deverserve Bidding] $ git push -u origin master host 'authenticity of mysite.com' (123.456.789.01) can not be installed 'RSA's fingerprint CD: 32: 3 C: 5A: 4A: 33: 44: 11: DF: EE: 3S: 4B: 3A: C2: A4: C2 Are you sure you want to continue connecting (yes / no)? Yes Warning: 'mysite.com, 123.456.789.01' (RSA) has been added permanently in the list of known hosts. Find maps at 1236056.789.01 at Ve6.phpwebhosting.com, but do not look back at this address - Possible BREAK- these ATTEMPT! Password for gi

java - while() loop for user input -

I'm working on setting up a while () the user who does not enter the integer Does. However, the way I have it now, after entering the integer to the loop, the message "Please enter integer" again prints, and then the program normally executes whether a person After entering an integer, can any method of recommending that message be reprinted? Thanks! System.out.println ("Enter the length of the word"); If (in.hasNextInt ()) {n = in.nextInt (); } Else {while looping (in.hasNext ()) // This is I'm talking about (System.out.println ("Please enter an integer"); if (in.hasNextInt ()) {n = in.nextInt (); break;; else {string c = in.next ();}}}} I agree I want to enter int (or integer) to the user and ask the user again and again until the user enters (or integer) enters. If so, try this: System.out.println ("Enter word length"); if (in.hasNextI nt ()) {n = in.nextInt ();} and {while (in.hasNext ()) // This is the loop I'm t

jquery - Send an Ajax request based entirely on the outcome of a first ajax request -

I am not surprising on jQuery, though I am creating a system from which the user selects from a stable category Launches an Ajax Request (especially a .load) that returns data in a second selection statement. This works perfectly for my purposes. I am having difficulty with the selection of this second SELECT statement to run the second Ajax request. There is no output with the second request, it does not appear in the fire Please tell me how can I improve my jQuery and how can I make the user choice on the second selection box , The third selection populates the box. My Ajax: $ (document) .ready (function () {$ ("# squery"). Change (function (e) {SelectText = $ ( ("#squery"). val (); PassData = $ ("# PDATA"). html (); if (selectiontext == "") {$ ("# teammailer"). SlideUp ();} and {$ ("#mail mailer"). Load ("mailerAjax.php", {SelectInput: SelectText, PermissionData: PassData}); $ ("# teamMailer"

asp.net mvc - Can't change styles using Site.css -

I am learning MVC 4 and I'm using one of the tutorial projects I have found. I am at the moment where I want to play with styles, but I am nervous. I thought that changing a style in site.css would be a job, but it does not matter if I ignore it. Here's a really weird part, though - when I delete the content of site.css and run this project, it seems that before I removed the style code. I know that I have not yet fully understood the specificity, but firebug tells me that the styles are coming from site.css . Can anyone tell me how this can happen? It looks like CSS has been cached by the browser. If this is the problem then what can you do? : Press Ctrl + F5 to reload all the resources. Try opening the site again in a secret or private browsing window, close all windows, and then open again in the secret or private browsing window. You can see the source of the Site.css file by opening the URL from the browser and confirming the content. If the c

cpu - floating point operations per cycle - intel -

I am looking for a while and I am unable to find an authoritative / decisive figure that is a precise floating point Cuts the number of operations / clock cycles that Intel Czon can complete QuadContor. I have an Intel Xeon quadcore E5530 CPU. I'm hoping to use this to get my theoretical FLOP / s my CPU. MAX FLOPS = (# number core) * (clock frequency (cycle / second)) * (# flopps / cycle) Anyone pointing me in the right direction will be useful . I have found this Intel Core 2 and Nehlam: 4 DP FLOP / Cycle: 2-wide SSE 2 Extra + 2-wide SSE 2 Multiplication 8 SP flops / cycle: 4-wide SSE extra + 4-wide SSE multiplication But I'm not sure where these figures were found. Do they consider a fuse multiplication number (FMAD) operation? EDIT: By using this, I cite the correct DP arithmetic input in the DP as 38.4 GFLOP / S (cited) by. For SP, I get double, 76.8 GFLOP / S I'm pretty sure 4 DP floppy / cycles and 8 SP flops / cycles are correct, I just confirm

r - Find min and max index where value is not Zero -

I have a vector that contains 8 elements I want to return a point called vector in which Max and Min of Test Vector will be included, where the test can not be zero. That is, I do not want to be minimal or maximum this is my code test & lt; - c (1,8,2,3,4,5, 0,7) test scores & lt; - c ((1: Length) ([test == minimum (test, no.rm = true) | test == max (test, no.rm = TRUE)) < p> Return score now Integer (0) > I want to return the digits 1 2 Because 1 is the minimum index and 2 is the maximum index < / div> border and use the match code>, it's a custom Faster than function: vals = range (test [test! = 0]) match (wal, test)

sql - How can i return additional columns and their values for duplicate records in MS Access? -

Currently, the queries below return a list of duplicate records based on their name, but I can add additional columns I am unable to separate values Is there any way to achieve this? For example, I can have a customer record with the same name, but it was written or made by someone else, I need to know who is the author so that we can prioritize which records should be removed. Could. SELECT o.ObjType, o.name, COUNT (o.Name) as the emblem, o Author O.ObjType, o.name, o.AuthorHaving (O.name)> 1) as O group from the customer. You can do this by joining the original data: pre> SELECT c. * FROM (O.O.O.J.Yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy, O.O.j. Hosting as COUNT (o [name]) and gt; 1) dups as the client in internal C. Type OBT = dups obz type and c. [Name] = deep [Name] and c. Author = Duple. Author Order, c. Obz type, c [name], c.uthor;

c++ - MFC logo in a MFC application -

Image
I have an MFC application when the application is launched, then I think it is using the MFC logo in the taskbar Has been shown on. In addition, there is an MFC icon in the application window menu bar How do I change custom with these people? The icons are in your .ICO file which is part of your project. You can usually edit them in the / race directory or replace them with the files you created.

facebook - How to display dynamic page description in a shared angularJS page (via google +1 for instance) -

I am trying to enable Meta in our app for google + and facebook + and I do not get anything The URL of the page, or {{pageDesc}} in the post, I am currently using an instruction that sets the meta description dynamically: HTML: < code> & lt; Meta meta-description & gt; Directive: App Directional ('Meta Description', ['Metadata', Function (Metadata)) {Refund {Restrict: 'A ', Replace: True, Template:' & lt; Meta name = 'description' content = "{{description}}" & gt; ', link: function (scope, element) {scope.metaData = metaData; scope.description = scope.metaData PageDesc;}};}]) ; While doing this, Google API does not recognize the title and description and sets the URL of the current page and the URL of the site as title / description. I was pinging around with a preorder. io, but I had to disable it because it has caused the +1 plugin crash. you have ten Documents must set HTML those values ​

functional programming - Writing a scheme function -

How do I write a function that takes a list of scoring functions (which I have already written) and pairs of input In the form of strings (which I am skeptical about writing), and gives a revised list of pairs of strings, where all the optimal strings are added from these inputs in the returned list, run according to the input function. example input: '("hello" "b_lo") ("hello_" "b_l_o") ("hello" "_blow") ("hello" Example of "shock" example: ("hello" "b_lo") ("hello_" "b_l_o") ("h_e_low" "blog_o_w")) ) ("Hello" "_blow")) The function takes a list of pairs of strings as it is shown above also takes it in a function It uses this function which takes it as a means of evaluating the list of string pairs . It then gives a list of pairs of string that contains all the pairs of strings, which, as a result, was the

c++ - How to return heap allocated values in Boost Spirit Qi -

के रूप में मेरे पास एक वर्ग है: class test {शून्य सेट वर्सन (संस्करण * संस्करण ); संस्करण * संस्करण () कॉन्स्ट; निजी: संस्करण * m_version; }; जिसे मैं BOOST_FUSION_ADAPT_ADT का उपयोग करके अनुकूलित किया है, मैं यह जानना चाहूंगा कि कैसे मैं व्याकरण के नियमों को लिख सकता हूं जो विफल होने पर बिना लीक किए संस्करण के ऑप्शंस को ढेर कर देता है। एक तरह से मैंने खोज की है [_val = phoenix :: new_ & lt; संस्करण & gt; (संस्करण (0))] अर्थ क्रियाओं में लेकिन यह मेरे लिए एक गंदे समाधान की तरह लगता है ध्यान दें कि आमतौर पर मैं ढेर आवंटित ऑब्जेक्ट्स का उपयोग नहीं करता हूं, लेकिन इस मामले में एपीआई पॉइंटर्स के साथ पहले से ही तय हो चुकी है। वास्तव में, यहां पॉइंटर्स का उपयोग न करें मेरा मतलब है, अपनी समस्या पर पुनर्विचार करें हां, मैं कुछ तरीकों के बारे में सोच सकता हूं, जिसमें आप बैक ट्रैकिंग पर लुकने की समस्या के आसपास हैक कर सकते हैं, लेकिन वे सभी बदसूरत, त्रुटि प्रवण और सबसे महत्वपूर्ण रूप से शायद अनावश्यक हो। गैर-स्वामित्व वाली सूचक द्वारा - संस्करण संदर्भित

geometry - Need algorithm for optimization issue of distribution points among the set of attractor points -

We have the following customization problems. There is a k (usually, k = 3-10) on the plane, which is called an ablator: A1, .., the size on the AK and the same plane is N (N is larger, Generally 10 to -100's +) is set. We need to tie 1 Autorator, N2 for 1 point - 2. .., KK should be tied to all the points in Kashmir: N1 + ... + nk = n. The goal is like "the point is tied to the closest attraction and the attractor has divided the nearest points in itself": P> ; j = 1..Nk) . Let's add the number of points appearing by L with the number that is bound to do this: Lk = dist (Pk1, A1) + dist (Pk2, A2) + ... + dist (PkN1, A1). Let's f be the total amount of distance: f = l1 + .. + lk . We need to reduce the f Does anyone offer any advice on how it can be implemented? Or maybe there are some known algorithms to do this? UPD: This problem can be reduced and can be solved by this and it is a matter of special problem.

python - How to use Unicode for a ForeignKeyField, Django -

मेरे पास मॉडल नंबर एक में एक विदेशी कीफीफ़िल्ड है जो एक __unicode__self.name प्रदर्शित करता है। मैं उपयोग करना चाहता हूं दूसरे मॉडल में एक ही यूनिकोड, लेकिन हर बार मैं ऐसा करने की कोशिश करता हूं कि यह कहता है कि मुझे इसे सांकेतिक शब्दों में लिखना चाहिए, मैं इसे डीजेंगो डॉक्स पढ़ कर सुलझाने की कोशिश कर रहा हूं, लेकिन मुझे पता नहीं कैसे हो सकता है। यहां कोड है: वर्ग विएजे (मॉडल। मॉडल): क्लासीकेटर = मॉडल। फ़िरेंसकी (क्लाएंट) फीका = मॉडल। चार्जफिल्ड (अधिकतम_ लैंग = 244, रिक्त = सत्य) उत्पत्ति = मॉडल। (max_length = 244, रिक्त = सत्य) destino = models.CharField (max_length = 244, रिक्त = सत्य) tracto_numero = models.CharField (max_length = 244, रिक्त = सत्य) def __unicode __ (स्वयं): वापसी self.cliente इसे आज़माएं: def __unicode __ (स्व): वापसी यूनिकोड (स्वयं। क्लाएंट)

list - Why can't ++ be used in pattern matching? -

From LearnYouAHaskell: There is one more thing ???? You can not use ++ in pattern matching if you try to match the pattern against (xs ++ ys), what will happen in the first place and what will happen in the second list? It does not matter what it would be wise to match the stuff against (xs ++ [x, y, z]) or bus (xs + [x]), but due to the nature of the lists, you do not Can. I am struggling to find out the reason for what it means by the nature of the lists, why can not it be so. You match patterns against the creators, and there are two constructors for the list, empty list < Code> [] and 'cons' : , where the two arguments of the opposition are the main and tail of the list. ++ is a function to attach two lists, so you can not match it. If you can get against it, then xs and ys in pattern xs ++ ys . For example, if you have also taken a small list like [1] then there are two possibilities xs == [] and ys == [1] xs = = [1] and ys == [] Ther

python - Django-haystack - how to make only a subset of items be searchable? -

I have some items that I'm indexing with Django-Haystack (elasticsearch backend) to be searched. It works fine, but the users are able to like the item, and I want users to do their favorite searches as they can find all the items. Relationships are presented with many people with a lot of favorites, because I need time when a user likes an item. Is there any way to specifically search users? I do not want to create a separate index for each user's favorites, because they will be at least because the item is identical and is already indexed by the master index. For reference, my models and search index look like: class gallery (models.Model): faves = models.ManyToManyField (user, through = 'favorite', tap = true, Related_name = "faves") class favorites (models.model): user = models.ForeignKey (user) gallery = model. Fargin (Gallery) Date = Model.Defhed (auto_now_add = true) class meta: order [= "date"] class thanks You want to see rela

javascript - How do I make the action of my form the src of my iframe -

& lt; form id = "submit" action = "" method = "post" & gt; IFrame के स्रोत के लिए डेटा सबमिट करने के लिए मुझे अपने फॉर्म की आवश्यकता है। यूजर एक्शन के आधार पर यह एसआरसी लगातार बदलता रहता है। & lt; iframe id = "iframe" src = "math_iframe.php" width = "100%" height = "100%" & gt; & lt ; / iframe & gt; इसलिए मैं इसे & lt; form id = "submit" action = "& lt; iframe src =" math_iframe.php जैसा कुछ करना चाहता हूं "" विधि = "पोस्ट" & gt; कृपया ध्यान दें: मुझे मौजूदा पृष्ठ पर रहने की इच्छा है। jQuery का उपयोग करें: $ ('# submit')। पर ('सबमिट', फ़ंक्शन (e) {$ (this) .attr ('action', $ ('# iframe')। attr ('src'));}); डेमो:

java - Set gradient direction in swing -

I am trying to draw a line in the swing and I am getting some laser-like effects using the gradient. I want to apply the gradient to the width of the line (ex: a red line core is fading for orange on the edges) The problem is that when I come to an angle, then I would like to apply the same angle to the gradient I am Public Zero Paint (Main Graphics) {Graphics2D en = (Graphics2D) g; GradientPaint GP = New GradientPaint (25, 25, Color, 15, 25, Color. Oere, True); en.setPaint (GP); Nststroot (new basicstroke (4.0f)); Andrline (10, 10, 800, 600); } An easy move to get away with this, call setTransform () To do graphics 2D this will be for you both for the rotation of the line and gradient at once. If you do not want to do this, then you will rotate the gradient manually (that is basically the gradient of PT1 and PT2, i.e., you have to calculate according to the rotation applied to your line). / P> While explaining my first thoughts this is a small example. Just slide the

c# - How do I pass user/password to navigate method in a InternetExplorer.Application object -

I want to automate one thing in IE using the power shell, I have the following snippet: $ i.e. = new object-com "InternetExplorer.Application"; $ Ie.navigate ('http://urlWithAuthentication.com'); This url has an http authentication, so the browser prompts for the user and the password, the previous script works fine, but I do not want to set the interactive user and password. For example: It does not exist, something similar looking $ ie.navigate ( 'http: // urlWithAuthentication .com', 'User', 'Password'); There is nothing about authentication in the method documentation I have found the same questions but when there is a login page (i.e. the user / pass form) I am targeted to handle the built-in user / pass prompt of the browser. I do not believe that COM The object is within the function because I have also seen it in the past, my own self Do not send the script username Wscript.Shell to use, press Tab, sent pa

java - Is downcast necessary if method is abstract? -

यहाँ एक उदाहरण है: सार्वजनिक सार वर्ग ठोस {// code ... // पब्लिक बेस्ट डबल वॉल्यूम (); } यहां एक वर्ग है जो ठोस फैलता है सार्वजनिक वर्ग के क्षेत्र में सॉलिड विस्तार होता है {//code..// सार्वजनिक डबल वॉल्यूम () {/ / कार्यान्वयन //}} अब, अगर मैं ऐसा कुछ करना चाहता हूं, तो क्या मुझे निराश होना पड़ेगा? सार्वजनिक वर्ग SolidMain {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] एल्ग्स) {ठोस सोल = नया क्षेत्र (// सही पैरामीटर ... //); Println (sol.volume ()); } मैं समझता हूं कि संकलित त्रुटियाँ तब होती हैं जब कंपाइलर सही तरीके से नहीं ढूँढ पाता। चूंकि वस्तु सोल उस प्रकार का ठोस है, जिसमें केवल एक सार मात्रा (); विधि है, क्या संकलक एक त्रुटि पैदा करेगा? मात्रा () विधि का उपयोग करने के लिए क्या सोल को p> क्या मैं वॉल्यूम () विधि का उपयोग करने के लिए किसी गोलाकार ऑब्जेक्ट में सॉल को घटा देना होगा?

c# - Opening a hyperlink generated dynamically with a string command -

Bastostory, So I'm working on a personal assistant program and all my voice commands Translated to the wire I have found the ability to search Google and display results as a hyperlinks in the text block. Now I want to be able to set up these links to open the speech (string command) so far I have the following. This bit allows me to search for using a custom GoogleSearch class Google Custom Search API. public zero search_google (string query) // Google search {#region link string string result_1 = ""; String result_2 = ""; String result_3 = ""; String result_4 = ""; String result_5 = ""; String result_6 = ""; String result_7 = ""; String result_8 = ""; String result_9 = ""; String result_10 = ""; #endregion Google Search Search = New Google Search () {key = "{APK}", cx = "{cxkey}"}; search.SearchCompleted + = (a, b) = & gt; {tab_control.Selecte

css - Twitter Bootstrap, Nav-Bar and Laravel -

Image
I am making an application using Laravel and I want to use twitter bootstrap. Using Laravel 4.1 and Boottstrap 3.1.1 I have to do a new time, so I did this code & lt ;; DOCTYPE html & gt; & Lt; Html lang = "en" & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1.0" & gt; & Lt; Title & gt; Authentication app with larlage 4 & lt; / Title & gt; {{HTML :: style ('css / bootstrap.min.css')}} {{HTML :: Style ('CSS / Main CSS')}} < / Head & gt; & Lt; Body & gt; & Lt; div class = "navbar navbar-fixed-top" & gt; & Lt; Div class = "navbar-inner" & gt; & Lt; Div class = "container" & gt; & Lt; Ul class = "nav" & gt; @if (! Auth :: check ()) & lt; Li & gt; {{HTML :: Link ('user / register', &

regex - Finding a text in a string -

मेरे पास नीचे एक स्ट्रिंग है: $ var = "ABC / type.xml / BYB नहीं = 1234 & amp;? xyz & amp;; = 6789 & amp पर एलएमएन "; मैं नहीं और मूल्यों पर जाना चाहता हूँ .. इसके साथ कैसे काम कर सकता है ?? आप कर सकते हैं, और संभवतः, उचित मॉड्यूल का उपयोग कर सकते हैं जो इस स्ट्रिंग को ठीक से पार्स कर सकते हैं, जैसे कि : सख्त उपयोग करें; चेतावनियों का उपयोग करें; URI का उपयोग करें; यूआरआई का प्रयोग करें :: प्रश्नपरैम; मेरी $ str = "एबीसी / प्रकार। Xml / BYB? नहीं = 1234 और = 678 9 और amp; xyz & amp; एलएमएन"; मेरा $ url = URI- & gt; नया ($ str); मेरी $ नहीं = $ url- & gt; क्वेरी_परम ('नहीं'); मेरी $ = $ url- & gt; क्वेरी_परम ('ए' पर); प्रिंट डम्पर $ नहीं, $ पर; आउटपुट: $ VAR1 = '1234'; $ VAR2 = '678 9';

mysql - Uploading CSV with multiple columns into SQL -

I have data that was originally in the .xls file that was to be inserted into .csv file. I am trying to create a database to upload to SQL, but I have separate columns in .csv file. How can I upload my column without my column, which will automatically upload and after that Makes a new column inaccurate? Thank you. How is CSV exported if it does not survive properly with embedded comma in the area, then you basically Hosed I will try to go back to the original source file and make a conversion with a device that casts the field properly.

javascript - Why doesn't my JQuery code work? -

I have some code that does not seem to work. I would have thought that it should give me instant scrolls immediately, but no. Can anyone tell me what is wrong with it? $ (document) .ready (function () {$ (document) .scroll (function () {alert ("hi!");)}}}); Syntax error with bracket line 4 - Correct code: $ (document) .ready (function () {$ (document) .scroll (function () {alert ("hi!");});});

delphi - Why do my registry writes report no error but have no effect? -

I am trying to create a new system DSN entry when my service is installed, by typing the registry through the Had tried to. Openky and Trajestery WrightString, but no value is being written. Of the three keys I am writing, I work fine. const sODBCRegKeyLoc = '\ software \ oDBC \ oDBCIII \ obdc data source'; SServerRegKeyLoc = '\ SOFTWARE \ ODBC \ ODBC.INI \ DSN Name'; RInstall: = TRegistry.Create (KEY_READ or KEY_WRITE); Try rInstall.RootKey: = HKEY_LOCAL_MACHINE; If rInstall.OpenKey (sRegKeyLoc, True) then Rinstall Write string ('Description', 'Monitors for new log entries.') Allows modification; RInstall.CloseKey; End; // This call works fine if rInstall.OpenKey (sODBCRegKeyLoc, True) then RINTL Arct string ('DSN name', 'SQL Native Client') starts; End; // If this call fails with an error message, then rInstall.OpenKey (sServerRegKeyLoc, True) then Aristoteles Start the right string ('driver', 'c: \ windows \ system32

python - Typerror: unorderable types -

I am writing a class for temperature and I am trying to compare if temp1 & gt; temp2 and so on. This function is part of the code for one of the definitions that is supposed to handle expectations. def __eq __ (self, others): if self .__ valid == truth and other __valid == true: if self .__ scale == other .__ scale: if self .___ world == Other .__ mag: Return is true: return false # if itself .___ Jag ​​and gt; Other .__ mag: #return True #else: #return False #if self .___ World & gt; = Other .__ mag: #return True #se: #Rurn False else: if self .__ scale == "C": A = other. Celsius () if it is itself .__ mag == a .__ mag: return is true Return: If wrong, self .__ scale == "F": B = Other FerronHet () if self .__ mag == B.__ mag: Return is true: return incorrect: return incorrect but when I do: A = Temperature (37.0, "C") & lt; Br> B = Temperature (30.0, "C") & lt; Br> Print (A & gt; B) I get an error: