Posts

Showing posts from January, 2010

cmake - How to set BUILD_SHARED_LIBS for included directory -

I have a very basic cement project that uses Google Test, I want to make it as DLL and CMeCelist's TATT file gate indicates that in order to create GITE as a shared library, you have to set BUILD_SHARED_LIBS . My problem is that I can not understand how to set up BUILD_SHARED_LIBS to show that if I set the value in the cache using Sentake-Gaya I actually see the Generated Build attempt to make DLL. Below is my CMakeLists.txt. I would appreciate the suggestions on how to set it up BUILD_SHARED_LIBS. CMAKE_MINIMUM_REQUIRED (VERSION 3.0 FATAL_ERROR) Project (MyProj) SET (BUILD_SHARED_LIBS on) ADD_EXECUTABLE (MyProj main.cpp) ADD_LIBRARY (MyLib STATIC mylib .CPP) TARGET_LINK_LIBRARIES (MyProj MyLib) ADD_SUBDIRECTORY (gtest-1.7 .0) Google tests will only be created as Shared Library (DLL) if BUILD_SHARED_LIBS is set. That's why I call it this CMKL list. I want to set in the file. I know how my own library has been shared, but I did not know how to set that variable...

javascript - Creating a slide in div with jquery -

I am trying to create a div with 2 buttons. Click on the first button and one noter diva slide from the left. There is a button in it, when clicked, it slides back to the screen. For the second button in the main device only when the second button is clicked on the right side of a diva slides This is done in all jquery. Can anyone tell me what is wrong here? jquery: var boxwidth = $ ("# port2"). Width (); $ ('# Left'). On ('click', function () {$ ('# port1'). Animate ({left: '8'});}); $ ('Click', function () {$ ('# port2'). Animate ({(true: '100%' - boxwidth})}} $ ('# leftC') 'Click', function () {$ ('# port1'). Animate ({true: '100%'});}); $ ('# rightC'). ('Click', function) {$ ( '# Port2'). Chetan ({left: '100%'})}} & lt; / div> css #text {width: 500px; height: 200px; background-color : Red; font-weight: bold; font-size: 1.2...

magento - not able to login on my website in my account -

I changed the template on my website and the first log was working very well but after entering the password the template Not working after login is not going through it even if I try to create a new account, even then it is not going into my account. Please check the links below ... Please check that I have already tried these steps ... Templates Go to / Customer / Form / Login .phtml and Template / Continuous / Customer / Form / login.phtml and Add the code below to the entry form getFormKey (); I have checked the page code. Please change this: & lt; Input type = "hidden" name = "form_key" value = "& lt ;? php echo mage :: getSingleton ('core / session') -> getFormKey ();? & Gt;" /> with: & lt ;? Php echo $ this- & gt; GetBlockHtml ('formkey') ;? & Gt; Refresh the cache and check again.

php - Vote 5 time from cookie -

I need to vote for cookies 5 times. Set IB by DB I can not do this because people are the same Sit on the network with remote addresses. Once I check it: if ($ dif_cookies == 1) // if the DB ($ _ COOKIE ["m_questioning3- $ external_id" ] == $ External_ID) {$ q_show_status = 3; } But I need 5 times, how? Thanks Dear Harolds, if (! Isset ($ _COOKIE) ["M_questioning3- $ external_id"])) {$ _COOKIE ["m_questioning3- $ external_id"] ["calculation"] = 1; } And {$ _COOKIE ["m_questioning3- $ external_id"] ["count"] ++; } ($ _COOKIE ["m_questioning3- $ external_id"] ["Count"] Please check this if it will work.

java - what is wrong with my backtracking algorithm? (sudoku solver, stackoverflow) -

Below is a method that solves Sudoku with backtracking algorithm .. or what i want to do The private boolean fillgrid (int [] [] a) {If (! (A (search) (A)) this method shows that if the assigned grid return is correct; For (int i = 0; i & lt; a.length; i ++) {for (int j = 0; j & lt; a.length; j ++) {if (a [i] [j] == 0) {// If an [i] [J] has been unassigned, (for example, intuit = 1; nm & lt; = 9; num ++) works below {if (noConflict (a, i , J, num), and noConflictGrid (a, i, j, digits)) a [i] [j] = num; If (fillgrid (a)) // recurse return true; A [i] [j] = 0; // Whenever false was unassigned to try again; } } } } return false; } But when I run it, I gave StackHowflow to Stackoverflow points to fill the points (A) with a 'recurse' comment, and (! ) Is below the method to find: Private boolean search (int [] [] a) {for (int [] b: a) {for (int c: b) {if (c = = 0) return true; } } return false; } Anybody please tell me what is wrong with the code? if (...

Format dates in Javascript -

I have to log my error with some error, for that I am using the following code: var dLogDate = new date (); Console.log (dLogDate.toString (). Substring (4) + ',' + dLogDate.toGMTString (). Substring (4)); According to the code output given above it is as good as what follows, but I do not need it: "10 October 2014 12:48: 59 GMT + 05:30 (IST), 10 October 2014 07:18:59 GMT "I want as follows: " October 10, 2014 12:48: 59 (IST), 10 October 2014 07:18:59 (GMT) " Watch before the date", ". I need to instal 10th October of 10th October Can be done with some functions that are transferring 4 characters from string and contrast to third position, but I'm still curious to know if there is any other easy way to do this? I do not want to use any third party's library / script. Thanks You can use date format format date Var Medium Index = date.getMonth (); Var dayIndex = date.getDay (); var monthArray = [...

count - How do you summarize columns based on unique IDs without knowing IDs in R? -

I am going through posts about data compression, but I think what I'm looking for. I would like to create an abstract "counting table" which will help me see how many times patients were given a specific medication. The fact is that some patients have got many medicines together, it does not matter, because I only want the essence of all the medicines and then calculate how the percentage of each drug class is given. The issue is that I Possibly the names given for the drug are not known, they are somewhere in "hidden" data.frame , so I have to specify which column will be R. To create a "list" already See, Through which he can then summarize the columns. I hope that it competes against the plyr package but in my work it has not worked yet to use it. My df looks like something x As you can see, data There are three columns in .frame in which what I want to do now is creating a list of unique characters, unique (x) unique (wi...

java - What is the right place to do formating- client or server -

Developing mobile platforms for formatting for numbers and dates is the right place? The number seems to be easier in Java than in Java and date formatting in Java. Is it better to send the date as a standard format to the server and send the format to the client or is it better to send a well dated date to the server? In addition, if several date formats are displayed in some places, then is it OK to send two telegrams to the server, each one is made in pattern? From my experience, I know that javascript can be triggered with numbers and date formatting, Not programmed in, but I program in PHP. I try to format it on the server to play with it more clearly and easier.

sonarqube - Snapshots not deleted in Sonar -

Image
I have a sonar project with snapshots compared to a year ago The problem is that old snofsters are not being removed That is, the (which I think) sonacruch actually causes a slow down. My database cleaner configuration is set to default on all settings. When I run a sonar runner from a griddle task, it also outputs it: ... 11: 23: 18.072 Debut - Post-job: Org.sonar.plugins.dbcleaner.ProjectPostJob@1ffdfd - & gt; Org.sonar.plugins.issueassign.notification.SendIssueNotificationsPostJob@140401 - & gt; Org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob@c5f5c2- & gt; Org.sonar.plugins.core.batch.IndexProjectPostJob@19261ea11: 23: 18.072 Information - Post-Job Class org.sonar.plugins.dbcleaner.ProjectPurgePostJob executed 11: 23: 18.503 information - - & gt; Keep a snapshot every day between 2014-09-12 and 2014-10-09 11: 23: 18.507 INFO - - & gt; Keep a snapshot per week between 2013-10-11 and 2014-09-12 11: 23: 18.513 information - - & g...

wpf - How to diplay/call an UserControl from another UserControl at click both situated in one MainWindow (C#/Xaml) -

I'm fine, I explain my problem and what I want. I have main window in my solution ; I call first user control in that Main Wando UserControlLibrary . I want a menu with the I'ts button when I first click on the first button of user control, the Visibility of Second User Control is Visible . userControlLibrary ). But I try many things but no one does the work. The first user control is UC_MenuSlider and the UC_Start_Study is the second one that must be visible after first clicking on a button. Launch UC_Start_Study is hidden . This is my menu window : & lt; Grid name = "Main grid" & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; Column width = "*" /> & Lt; /Grid.ColumnDefinitions> & Lt; UserControlLibrary: UC_StartStudy x: Name = "UC_Start_Study" grid. Column = "1" height = "auto" width = "auto" margin = "70 0 0 0" visibility = "hidden" /...

java - How do I ensure that all Threads are stopped before main Thread is stopped? -

This is my program in which a thread starts under the main method public class Thread Test {Public Static Zero Key (String Algos []) throws Interrupted Expressions {Thread main thread = Thread WrenchTrad (); Thread t1 = new thread () {public runs zero () {while (true) {System.out.println ("hi"); }}}; // t1.setDaemon (true); T1.start (); }} How can I ensure that all the child threads will stop before the main thread is stopped? I do not want to use the demon option Is it possible? In the main thread, you can wait to end other threads. In the method performed by the main thread (the main method in your example): t1.join (); But remember that if t1 will not end, the main thread will not end. So you want to use Migrate with an expired time. t1.join (10000);

java - Is DatatypeConverter thread-safe? -

विशेष रूप से, विधि javax.xml.bind.DatatypeConverter.parseBase64Binary (स्ट्रिंग) है धागा -सॉफ़? इस दस्तावेज में कुछ भी नहीं है जो बताता है कि क्लास थ्रेड सुरक्षित है इसलिए मैं आपको यह अनुशंसा करता हूं कि ऐसा नहीं है। मैं अपाचे कॉमन्स कोडेक से सुझाता हूं जो बताता है कि यह दस्तावेज में धागा-सुरक्षित है।

html - Keep ajax loader in sight in a page with much content -

I have this div which can be found in the AJAX loader 'image Works in the form of ' This is pure CSS. The problem I am having is that the page has a lot of content and if you are somewhere down the page, you will not see the loader because it appears anywhere on top of the page. Why do I need to change: div id = "floatingbarsg" style = "display: none; condition: full; top: 50%; left : 50%; padding: 2px; z-index: 99999 "& gt; & Lt; Div class = "blockG" id = "rotateG_01" & gt; & Lt; / Div & gt; & Lt; Div class = "blockG" id = "rotateG_02" & gt; & Lt; / Div & gt; & Lt; Div class = "blockG" id = "rotateG_03" & gt; & Lt; / Div & gt; & Lt; Div class = "blockG" id = "rotateG_04" & gt; & Lt; / Div & gt; & Lt; Div class = "blockG" id = "rotateG_05" & gt; & Lt; / Div & gt; ...

sql server - Difference between select count(*) from and select count('quoted string') -

I'm curious about that, some time ago someone had told me that a count ('quoted strin' Code> instead of count (*) I mean, use the select count ('quoted string') instead of Select the count (*), and the reason for this was that count (*) goes through all the columns and reduces the performance, others have told me that there is a difference Is not ... but if True, does this mean that the count ('cited string') is equal to computation against any of the columns? Thanks. Count ('any quoted string') or any static expression or literal equivalent. There is no need to even reach the column. To calculate total rows (cardinality) compared to the count There is better and affect the right for the latter to zero values. In practice, there is no difference between counting (1) and count (*) (without quotation) because the Optimizer counts on request for the number of rows on any database of salt (* ), And does not reach all columns...

java - How to pass language to liferay using cas authentication -

I have created some login pages and used CAS to authenticate and log in to my life server. My integration works and I am able to log in and access my tongue server. Now I am planning to make a language selection in my login page so that once the user needs to select the language that needs it, I can choose how I win it. Liferay accepts the language as the first path element in its URL - e.g., www.example.com/web/guest/ Instead of redirecting to home , www.example.com/es/web/guest/home . Alternatively, consider different ways Liferay determines the language: Through Accept-Language browser header, the user's profile, the default language of the global portal.

ios - Width of UINavigationController view in iOS8 modal popover? -

In my iPad app, I present a navigation controller in a model form sheet, and set the width of a label in it The width of that navigation controller (i.e. the full width of the form sheet) In iOS7, it works perfectly in iOS8, the width is reported as the full width of the device (either 768 or 1024 digits). I know that these popovers have been demoted to some extent on IOS8, but is there a way to get the correct width of the form sheet in this situation in iOS8? The frame of the scene is not correct when you have created - viewDidLayoutSubview or - layoutSubview . Set your label width in - viewDidLayoutSubview of your view controller.

selenium webdriver - Display property of a object -

On the login page of StackOverFlow, click on the "Log in using the stack exchange" link and click the "Forgot Password" link Disappears so that the display forgot the password Forgotten password Forgotten password Forgotten password How to verify it using the getAttributes () method I Thanks You can use better, like from Selenium.webdriver.support.ui The Eleniam import Vebdraivr python : import by import Vebdraivr Seleniamkvebribrivrkcom using. Import from selenium.by videtrewer Import imported_ conditions as the import invoice = webdriver.Chrome () driver.get ("https://stackoverflow.com/users/login") and click the # button and stack_exchange_button = driver.find_element_by_xpath ("//span [text () = 'Login using Stack Exchange) stack_exchange_button.click () Wait for 10 seconds for forgot links to be invisible web driver T (driver, 10). Until (EC.invisible_of_element_located (( By the way, the "link is invisible...

c# - Labels on the same line, not under each other -

मेरे पास यह है: & lt; div & gt; & Lt; dl वर्ग = "डीएल-क्षैतिज" & gt; & LT; dd & gt; & Lt; h5 & gt; @ Html.DisplayFor (मॉडल = & gt; मॉडल। प्रथम नाम) & lt; / h5 & gt; & Lt; / dd & gt; & LT; dd & gt; & Lt; h5 & gt; @ Html.DisplayFor (मॉडल = & gt; मॉडल। लास्टनाम) & lt; / h5 & gt; & Lt; / dd & gt; & Lt; / डीएल & gt; & Lt; / div & gt; यह एक प्रथमनाम है lastname। लेकिन वे इस तरह एक दूसरे के नीचे दिख रहे हैं: अल्बर्ट न्यूटन और यह होना चाहिए: अल्बर्ट न्यूटन dd {display : इनलाइन-ब्लॉक; } डीडी तत्व डिस्प्ले इनलाइन होना चाहिए ताकि आप सिर्फ अपने सीएसएस में डीडी जोड़ सकें और अगर डीडी बूटस्ट्रैप तत्व है, तो आपको महत्वपूर्ण टैग के साथ ओवरराइड करना होगा dd {display: inline-block! Important; }

javascript - Clickable colour boxes to change chat bubble colour -

I have a chat application where a user can submit a message and the message appears in the chat bubble with orange background I have created 5 colored div boxes that I want to link to the background color of the chat bubble. I hope that users can click on one of the colorful divas and the messages below will be displayed in the chat bubble along with that background. How can I do this? See link for illustration: Code: HTML: & lt; / Ul & gt; & Lt; Div & gt; & Lt; Input type = "text" id = "typetextbox" /> & Lt; Button type = "submit" id = "submit" & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt; Div & gt; & Lt; Img src = "images / brown-block pages" id = "brown" /> gt; & Lt; / Div & gt; & Lt; Div & gt; & Lt; Img src = "images / blue-block pages" id = "blue" /> gt; & Lt; / Div & gt; & Lt; Div & g...

Android: Fragment overlay another fragment with semi transparent -

Assuming I have 2 pieces, one of these is the list view and the second is the loading text when I want to When I click on a list item, then the loading text fragment list appears at the top of the view. I have adjusted the opacity of loading text background: Android: background = "# 33FFFFFF" but it still shows the loading text on a solid brown background. & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; ListView xmlns: android = "http://schemas.android.com/apk/res/android" Android: Orientation = "Vertical" Android: layout_width = "match_parent" Android: layout_height = "match_parent" android: id = "@Android : Id / list "android: background =" # e8e9ee "Android: divider =" #ccc "Android: dividerHeight =" 1dp "/> piece containing a text view: My Java code is basically something like: onItemClick: Fragment transaction transaction = ma...

multithreading - Do i need to synchronize read and write actions to the same SerialPort instance? -

Here's my scenario: I have to read and write on the same serial port in several threads. Instead of creating a serial port in each thread, which would be the reason for the 'Access Denied' error, I use global cache to work for each serial port, I only hold one serial port object. Private static object locker = new object (); Internal Stable Dictionary & lt; Int, serial port & gt; SerialPorts = New Dictionary & lt; Int, serialPort & gt; (); Private SerialPort GetSerialPort {Lock (Locker) {if (SerialPorts.ContainsKey (port)) {SerialPort sp = new SerialPort (port, baudrate); Sp.Open (); SerialPorts [key] = sp; }} Return SerialPorts [Key]; } In the read and write task, I first call GetSerialPort to get SerialPort objects. Then the related readbits and written method are called. Now my question is: without any special handling, do you have many threads to call ReadByte or methods of writing at the same time? Yes, that's fine, as long as only o...

windows - Are file names in Ubuntu case sensitive? -

I mean if a file is created in windows that has been named "a.txt.txt" and the same Trying to create another file in the destination such as A.txtâ ???? Is prohibited. Is it only in Ubuntu? Thank you for your valuable consideration for a silly question. For your title: Yes, they are case-sensitive. For your inline question: No, there is nothing that will stop you from doing so. Unix & amp; Linux generally uses case-sensitive file systems, so A.txt and a.txt .

java - Extend Visitor pattern without modifying the original source code? -

I had a problem increasing visitor patterns in many modules, you can read the explanation of the problem in the comments. Example of interface Interface (interface) (ISO server (Visitors);} class Module1Source1 applies ISource {@ override public objects accepted (ISourceVisitor visitor) {return visitor.visit (this) ;}} Class Module1Source2 applies ISource {@ override public objects accepted (ISourceVisitor visitor) {return visitor.visit (this);}} interface ISourceVisitor {object travel (Module1Source1 wheel); object travel (Module1Source2 engine);} class supported Christian Trivia Visitors iisoswiziter {@ Override Public Object Visit (Module 1 Source 1 Wheel) {Return Immutable List ("USD");} @OverWide Public Object Visit (Module 1 Source 2 Engine) {Return ImmutableList.of ("EUR") ; /> Suppose we do not want to change the above code because it is in any other library / I want to add another source class. Module2Source1 implies imers {@Override Public Objects ...

Stop loop when condition variable (global var) changes in javascript -

I have a problem which I can not solve is a loop in my javascript where a global variable it depends on. Loop looping starts and when I change the value of that global variable, it never ceases. stop = false; Var i = 0; While ((stop == incorrect) & amp; amp; (i & lt; 100000)) {console.log ("hi -" + i); I ++; } while the loop is running, if I stop = true, then it never stops thanks! Any ideas? text"> JavaScript is inherently Is single threaded from. Once a block of code has started, it will be completed before anything happens. IE, in which case you are setting the stop to true , will not be executed until the loop is finished. You need to split your loop sections and allow individual events to run each section individually: stop = false ; Var i = 0; Function loopologic () {var tempStop = I + 500; While (i & lt; tempStop) {// Basic processing logic console.log ("hi-" + i); I ++; } If (! Stop & amp; i & lt; 100000)...

php - Class 'ZendService\Amazon\S3' not found even though it is installed via Composer -

My project is based on the Zend Skeleton App, and I am using Composer to add vendor packages. However, when I add the Zedders-Amazon package, it is not getting autoloaded. Here's my composer Jason is a part of the file: "require": {"Php": "> = 5.3.3", "zendframework / zendframework": "2.3. *", "Zendframework "Zf-commons / zfc-user-doctrine-orm": "dev-master"} "/ zendservice-amazon": "2.0. *", "Theory / theory- orm-module": "0.7. *", "Zf-commons / Code> I have seen the autoload files in the vendor directory, and they are included in this ZendService \ Amazon Namespace I have tried many different things, but this is not working. I have double checked that the musician's auto-loader is being used, so is it really a surprise? thank you in advanced. Documents and examples are wrong in the Zend Framework documentation, rather than: $ s3 = new ...

excel - Applying Application.ScreenUpdating to all worksheet apart from first row -

How does one apply the following in my worksheet except the first 2 rows? Apply private sub worksheet selection (range as Cheng). Screen updating = Falls cell.InterCaller index = 0 target.InterCaller index = 23 cell.fonts.color index = 0 target.font.color index = 2 Cells.Font.Bold = False Target.Font.Bold = True Application.ScreenUpdating = True End Sub Thanks If target Rau & gt; 2 then Does this mean yours?

mysql - How to add years in a date column? -

मेरे पास निम्न प्रश्न हैं: SELECT code, date_format (first_date, '% d यदि मैं चौथी पंक्ति को निम्न में बदलता हूं: पूर्व> date_add (date_format (last_date, '% d /% m /% y'), अंतराल 5 वर्ष) और परिणाम के रूप में नल प्राप्त करें। समस्या क्या है और मैं इसे कैसे हल कर सकता हूं? पीएस .: प्रथम_डेट और अंतिम_डेट "डेट" प्रकार हैं। अपने फ़ंक्शन कॉल्स को आसपास स्विच करें ताकि आप पहले 5 वर्ष जोड़ दें और फिर प्रारूप को नई तिथि: date_format (date_add (अंतिम_डेट, अंतराल 5 वर्ष), '% d /% m /% Y')

Azure Mobile Services, Table Storage and Emoji not working -

I am using mobile services to store on table storage at auction. When I send emoji characters for mobile services from iOS and try to store on table storage, I get an error: Error: invalid character in string (¿½): ok ?? Line Ð ?????? Line On XMLFragment.assertLegalChar (D: \ home \ Site \ wwwroot \ node_modules \ blue \ node_modules \ xmlbuilder \ lib \ XMLFragment.js: 354: 15) XMLFragment.text (D: \ home \ Site \ wwwroot \ node_modules \ Blue \ node_modules \ xmlbuilder \ lib \ XMLFragment.js: 139: 12) XMLFragment.txt (D: \ home \ site \ wwwroot \ node_modules \ blue \ node_modules \ xmlbuilder \ lib \ XMLFragment.js: 369: 19) on AtomHandler._writeAtomEntryValue (D: \ home \ site \ wwwroot \ node_modules \ blue \ lib \ util \ atomhandler.js: 249: 37) AtomHandler._writeAtomEntryValue (D: \ home \ site \ wwwroot \ node_modules \ blue \ lib \ util \ atomhandler. Js: 239: 32) AtomHandler._writeAtomEntryValue (at D: \ home \ site \ wwwroot \ node_modules \ blue \ lib \ util \ atomha...

java - Buttons not responding when pressing -

I'm new to Android development and I'm making a simple calculator. Everything is working fine and no errors are showing, but whenever I press them, the button is not working. My goal SDK API19: Android 4.4 (KitKat) and compiling with API 20: Android 4.4 (KitKat Wear) . Here is my code, Main Activity. Java package edu.shihank.mycalcv2; Import android.support.v7.app.ActionBarActivity; Importroid.os.Bundle; Import android.view.Menu; Import android.view.MenuItem; Import android.view.View; Import android.view.View.OnClickListener; Import android.widget.Button; Import android.widget.TextView; Public class main activity actionbusiness activity (public text TV); Public name numbBf; Public string operation; Public Button ClickList BTNClick; @ Override protected void saved create (bundled Instansstet) {Suprknkret (saved Instensstet); SetContentView (R.layout.activity_main); Tv = (TextView) findViewById (R.id.tv); Intuitist [] = {R. Dijorro, R.Did.On, R.Did.DO, R.Did.TH,...

c# - NUnit: Unit Testing Entity Framework ViewModel in WPF MVVM? -

I'm just starting with the full basic elements of the unit test I have used the initial tutorials as a guideline. Here is my test model, which contains a method that performs a Linux query with EF. The class is in the same project as my application for now. Namespace diiInteelments. Tests [{TestFeacense] Public Class Entitelmeigmodel Tests: Notification Messages {Entitlement Entactions _contact = New Entitlement Entity (); Private Observation Closure & lt; VwAccountHeader & gt; _accountHeaderCollection; Public Supervision Collection & lt; VwAccountHeader & gt; Account Header Collection {Return _accountHeaderCollection; } Set {_accountHeaderCollection = value; OnPropertyChanged ("AccountHeaderCollection"); }} [Test] Public Zero GetAccountHeaders () {var query = Select one of the _context.vwAccountHeaders; AccountHeaderCalution = New Observation Collection & lt; VwAccountHeader & gt; (Query); }} When I run a test in NUnit, I get the follo...

javascript - ngRepeat:dupes even with track by $index (special case) -

Short background: - Creating a social networking site and I am storing conditions and users with MongoDB . For example, "URL", "Profile URL": "AC 271A307", "Tips": [], "Time": "2013-10-28 T22: 25: 24.278Z", "Active": True "Owner": DBRF ("user", "ABC @ EEGEG"), // Mongo DB users collection "_id" reference: object ID ("526ee454da46f33bf8000002")} Angle is doing; & lt; Li ng-repeat = "position in position | isUserStatus track by position ['_id']" ng-show = "statusactive" square = "user-state-bland" & gt; // Here I display the user data and status itself. & Lt; / Li & gt; Note: This works all right But this is the problem. I'm using Websock to automatically update and add new statuses to $ RootScope.statuses. socket.on ('new condition', function (position) {$ timeout (function () ($ rootSc...

php - To fetch a field value on basis of user input -

इस सवाल का पहले से ही एक उत्तर है: 33 उत्तर मैं एक लाने की कोशिश कर रहा हूँ उपयोगकर्ता इनपुट (उपयोगकर्ता नाम) के आधार पर फ़ील्ड वैल्यू (सुरक्षा क्यूज़)। निम्नलिखित कोड है: $ substr = substr ($ usrnm, 0,2); यदि ($ substr == "एसी") {$ res = "से सुरक्षा सुरक्षा का चयन करें reg_ac WHERE उपयोगकर्ता नाम = $ usrnm"; } और {$ res = "सेक्वाय सुरक्षाक्वाइसेस से reg_indi WHERE उपयोगकर्ता नाम = $ usrnm"; } $ परिणाम = mysql_query ($ res, $ db_handle); $ परिणाम = mysql_query ($ res); जबकि ($ पंक्ति = mysql_fetch_assoc ($ परिणाम)) {गूंज $ पंक्ति ['सुरक्षाक्यूज']; } लेकिन मुझे निम्नलिखित चेतावनी मिल रही है: चेतावनी: mysql_fetch_assoc () पैरामीटर 1 संसाधन होने की उम्मीद करता है, बूलियन को C: \ xampp \ Htdocs \ my on line 120 यह त्रुटि संदेश इस तथ्य से उत्पन्न होता है कि आपकी क्वेरी एक त्रुटि है और निष्पादित करने में विफल रहता है और आप को पकड़ने के लिए कोई त्रुटि जांच नहीं है। चूंकि यूज़रनेम स्ट्रिंग है, इसे अंदर के उद्धरण चिह्नों की ...

javascript - Chrome app - setBounds() deprecated -

अब, मैं यह कोड कैसे बदल सकता हूँ: chrome.app.window वर्तमान ()। सेटबाउंड ({width: aaa}); यह कहते हैं, "इनरबॉन्ड या बाहरी बाउंस का उपयोग करें।" ... कैसे? प्रत्येक सिंटैक्स के लिए मैं कोशिश करता हूं, त्रुटि (ऑब्जेक्ट / नंबर फ़ंक्शन नहीं है) : विंडो की स्थिति निर्धारित करने के लिए, आप निम्न कार्य कर सकते हैं: chrome.app.window.current ()। बाहरी बाउंस.संस्थापक ( स्थिति, वामपंथी स्थिति); स्थिति होने के कारण स्थान और स्थिति से संबंधित पिक्सेल। जो मैं करना चाहता था वह स्क्रीन के केंद्र में ऐप विंडो को स्थान दे रहा है, इसलिए मैंने ऐसा किया chrome.app.window.current ()। OuterBounds.setPosition (मठ। चारों ओर (window.screen.availWidth * 0.5-170), 100); आप तर्क देख सकते हैं बाईं तरफ के लिए यह है: मठ। मैदान (विंडो.screen.availWidth * 0.5-170) यह उपयोगकर्ता की स्क्रीन की चौड़ाई प्राप्त करेगा और 0.5 की स्थिति निर्धारित करेगा चौड़ाई घटाएं वाई के आधा नया आकार मेरे मामले में विंडो का आकार 340 है, इसलिए मैंने 170 का उपयोग किया। गणित का दौर एक अवैध मान प्राप्त करन...

Autocomplete in solr with popularity -

I am now using solr autocomplete and search function, I have searched the popularity of the words searched in the ranking of automatic suggestions I want to use. For example, if 'usb' was searched 10 times in the last week, and 'user' was searched 100 times last week, while typing 'us', the user was ranked higher than USB needed. Is there a way to fulfill this requirement? Thank you In short, you need to use the index to promote the value of a 'search queries' Need index '- and refresh it from time to time. You have an index of all searched queries. That index can be created with index time boost for each dock, as the function of the function that was searched for. Boost factor can be searched for only a bar. Example search queries - 'Foo', 'Foo', 'Bar', 'Bar', 'Bar', 'ABCD' will be added to 'Foo' in a new index, in which 2 Will increase, with 3 'times' with ABCD. You ...

sql - SUBSTRING in a Scalar UDF - Unexpected Return -

I am working in SSMS 2012. I have a scalar UDF that tests to see if a certain value is a 3-digit number: Returning announcement @output varchar (50) set @output = is the case when LEN (@input) & create function [dbo] [test8] (nvarchar @input) varchar (50) Lt; & Gt; 3 'Failure' when left (@ input, 1) not having 3 characters like '% [123456789]%' --must then 'failure' --first character is a natural number when substring (@ input, 2,1 '% [0123456789]%' then 'Failure' --second character should be a natural number (not including zero) when the string (@ input, 3,1) does not like '% [0123456789]%' Then 'Failure' - The third character should be a natural number (zero inclusive) ELSE 'success' END returns @out put END They have the following questions, in which I am trying to return the record where a fixed column fails when it has passed the UDF: Select Col1 with some_table where Dbo.test8 (Col2) = 'Failu...

Slow performance running ordered query on SQL Server table with hierarchyid field -

I have a tree of classes stored in the table, which is currently a traditional parentcategoryId field And a hierarchy area called Eclllon The following query is successfully sorted by a depth level in the format of data needed and by their depth and category name: with q as c (c.Id, c.Name, c.Echelon, c.Echelon selection, NewEchelon as category c Zero is Zero and ParentCategoryId Zero Unions select all c2.Id, c2.Name, c2.Echelon, hierarchyid :: Parser (q.NewEchelon.ToString () + (more than ROW_NUMBER (). By order) NVARCHAR (max) + '/') from q to c2.Deleted include c2 class c2 and c2.Echelon.IsDescendantOf (q.Echelon) = 1 and c2.Echelon.GetLevel () = Q.Echelon.GetLevel () +1) Select * New order from the order by NewEchelon The display of this query is unfortunately, not really great, there are only 319 categories in the actual table, and 89 of them To Deletion of has been removed soft with a non-null value in the column. The time for that query is as follows:...

html - A way to temporarily add an external stylesheet to an already existing website that is shareable -

I'm not sure that it is already present, but I searched and could not find anything. This is my problem: We have a customer, which is really old and old website, but they have no budget to complete restart. Actually, they want to do some basic updating of the style (changing colors and fonts, increasing font size etc), basic CSS editing. Before this can happen, before I present to the classic, I should be able to review the interior style changes with my creative director. My question is, is there really a simple way to slap a different / new external style sheet on that I can currently take online websites and a new "update" website is a new one Can I send my creative director to review the URL? Is there any website / service that does this? EDIT: The browser extension will not solve the problem because it will only work for me, I should be able to share the link internally for review, and potentially send it to the customers as well. I think after that I r...

optimization - The best way to handle content in virtual url - php -

I have an application with PHP in the MVC pattern and smart template engine. And there is no problem with Apache and rewriting engine. And I try to handle the URL and load content in my code with this code: I split the request of $ req array: ... ... Load All Libs and Functions Required $ Smarty- & gt; Display ('header.tpl'); // Main switch case switch ($ req [0]) {case 'index.php': './inc/index.php' is required; $ Smarty- & gt; Display ('index.tpl'); break; Case 'list': $ smarty-> Display ('list.tpl'); break; Case 'topic': $ smarty- & gt; Display ('single.tpl'); break; Case 'login': require_once './inc/login.php'; $ Smarty- & gt; Display ('login.tpl'); break; Case 'msg': $ smarty- & gt; Assign ('msg', $ req [1]); $ Smarty- & gt; Display ('message.tpl'); break; Default: $ smarty- & gt; Display ('error.tpl'); break; } $ Smarty- ...

javascript - Creating new windows when using backbone.js and jQuery -

Currently I'm creating a dialog box using jQuery and populating it using the spinal cord : $ ("#" + DialIid) .html (New MyView ({Model: MyModels}) .l); $ ("#" + DialogID) Dialliog ({width: 950, height: 500, auto open} true, dialog class: dialid, status: {my: "center", at: "center", of: window}, close: function (event, UI) {$ (This) .remove ();}, Title: "My Dialogue"}); What I want to do, is creating a new window so that users can transfer it more liberally, so I tried: var = Window open (); Var HTML = $ ("#" + dialogID) .html (); $ (W.document.body) .html (New MyView ({Model: MyModels}) .l); It almost works I lose my style and some functionality is lost. Can someone suggest how to fix this snippet so that my style and functionality can be restored? (For example, my data table styles have gone and some contacts with elements in the original window). Thank you! I can suggest two possible solutions to y...

security - My friend hashes passwords with SHA512 algorithm without salt. How do I convince him that he needs to add salt? -

I got some incredibly stupid today - my friend shouted the user's password without salt 512 algorithms I have immediately discovered that I raised this issue from them but he said that he wants to see a password in his database in any form. I told him that his database without any hush is weak for the attack of the rainbow, but he said that there is no big rainbow table for Shah 512 because each has 64 hex characters long. How do I understand him still need to add salt? Does anyone know what is the hash cracking rate of lion 512? I can argue that it can take a lot of time to break all 8 passwords, etc. itemprop = "text"> If you ask a friend that he has found any of the following hash in his database: Bl09f3bbbc244eb8244l9l7ed06d6l8b9008dd09b3befdlb5e07394c706a8bb980bld7785e5976ec049b46df5fl326af5a2ea6dl03fd07c95385ffab0cacbc86 bc547750b92797f955b36112cc9bdd5cddf7d0862151d03a167ada8995aa24a9ad24610b36a68bc02da24141ee51670aea13ed6469099a4453f335cb239db5da a...

javascript - Backbone Inline HTML Templates versus External Templating -

& lt; Body & gt; & Lt; Div id = "container" & gt; & Lt; Header & gt; & Lt; / Header & gt; & Lt; NAV & gt; & Lt; / Neo & gt; & Lt; Div id = "pagecontent" & gt; & Lt; / Div & gt; & Lt; Footer & gt; & Lt; / Footer & gt; & Lt; / Div & gt; & Lt ;! - Featured Articles / Homepage Templates - & gt; & Lt; Script type = "text / template" id = "validation" & gt; & Lt; Link rel = "stylesheet" href = "css / homepagecontent.css" /> & Lt; Section id = "banner" & gt; & Lt; / Section & gt; & Lt; On one hand & gt; & Lt; Div & gt; & Lt; / Div & gt; & Lt; Div & gt; & Lt; / Div & gt; & Lt; / One side & gt; & Lt; Section id = "main" & gt; & Lt; / Section & gt; & Lt; Section id = "opinion" & gt; & Lt;...

oracle11g - SQL query to find date between a range of dates -

Table X contains related information related to the start date and end date and these dates. Stored in DB in both date format I need to find a specific date on 12th January-2000 and needs to be removed from the rows whose dates range includes this date. Can somebody help me out. I'm new to SQL, so here's some guidance needed. Table X: ID | Start_data | Expiry date 1 | 12/30/1999 | 01/12/2000 2 | 01/20/2000 | 01/30/2000 3 | 01/07/2000 | 01/15/2000 In this manner my query should be returned to ID-3 because the limit is 01/07/2000-01 / 15/2000 on 12th January Thanks Betaewen operator: SELECTX to TableX WHERE DATE '2000-01-12' during the beginning and end date

Efficiency JSON vs Delimited String in Javascript -

I am currently working in the zero MQ with the node. ZeroMac allows for a message in the form of a string between the applications. The application will be processed on thousands of messages. Will be faster to parse the delimited string: "foo bar baz" .split (''); or the Stretpted JSON object: JSON.parse ('{"a": "foo", "b": "bar", "c ":" Baz "}); How to test the efficiency of each (speed and memory) in each Node.js and / or browser. = "text"> You have chromium for Chrome or Linux) You can use something similar to the following code: // open the first inspector ** ctrl + shift + i ** Then write the code Switch to the Console tab for / or you want to open the `Tools & gt; Developer Tools` then select the console tab / code here: console.time ('t1'); "Foo Bar Barge" .split (''); Console.timeEnd ('t1'); // result t1: 0.020ms co...

parse.com - android and web app in kiicloud can I sync their data in kiicloud? -

I am trying to create an Android app and web app that syncs your data in KiKeload or any other backend provider. Does. I know that there is an SDK for Android and JS in KeyOload, but JS is only for Mobile Apps because it is just Javascript, they do not have support for server side code, so my question is, Can I do in the provider? I have created an app with a local SQL Database, but I have not used a backend provider like Pars, Kinwei or Kiiklod, now I want to create an Android app / web app which is both platforms And Sync should be updated / updated so that both have new / updated items, the app should work offline too. Many similarities like Pars Share such as KiiCloud and other MBAAS providers You can create a high level interface (MBaaSInterface.java) that exposes the most common tasks (save objects, retrieve objects, etc.) and then for each MBaaS (e.g. KiiClodImpl.java, ParseImpl.java, etc.) Create the implementation of the interface. . You can use it to feel the di...

python - Pandas report top-n in group and pivot -

I summarize dataframe with grouping with one dimension D1 and reporting summary statistics for each element of d1 I am trying. Specifically I am interested in the top n (index and value) for many metrics, what I want to output is a line for each element of d1. I say two dimensions D1, D2 and 4 matrix M1, M2, M3, M4 1) What grouping by D1, and, Top ND2 and Finding the Metric Value is the method of suggestion for each of the Matrix M1 -. M4 Data analysis shows that for Wes's book in Python (page 35) def get_top1000 (group): return group.sort_index (= 'births' From, ascending = false] [: 1000] Grouped = names.groupby (['' year '' 'sex']) Top1000 = Is this still the recommended way (only for 1000s of D5 and many matrix 2) Now the next problem is that I want to pivot the top 5 (ie, I have a line for each element of D1) so The resultant data frame dimension should look for D1, D2 and Metric M1: 5 values ​​of column D2 for index D1 and top an...

elasticsearch - Docker ADD then RUN -

I'm creating a Docker Image for our specific implementation of an elastic search server. It requires config file in my dockerfile , I have the following commands: RAN MKDIR / AddLolastic Web / Plugins Plugins / es_plugins.tar / run elasticsearch / plugins \ cd / logical search / plugin & amp; \ Tar -xvf es_plugins.tar & amp; Amp; \ Rm -f es_plugins.tar Docker build succeeds on mkdir, and ADD. But a wire error "es_plugins.tar: can not fail: there is no such file or directory" This is my first time with the Docker Any idea why "ADD" looks successful but runs Fails? It took an hour, but I found out how to run my container and drop it into a shell. it happens. It seems that when I "ADD file.tar / destination / dir" it actually transfers files / directories inside the tar within the destination. What I wanted is that, but I'm surprised I have to do more research.

git - Rebase local branch ontop of github branch -

I have a local branch "my_feature" for which I have opened a bridge request on Gitobb. $ git branch my_feature ... made some changes $ git add $ git push origin my_feature Now another person made a change on the bridge request , And I want to rebase its local branch over here. How can I do this? I thought git pull is done on this my_feature branch, but it does not look like this. git pull the branch that your branch has configured up. You can see it from git branch -vv . If it is not what you want to leak against, then they can set up a new upstream and rebase ( git branch - set-up -stream-to = ) Or try again git rebase --onto

javascript - Retrieve the values from array and store it in csv file using MongoDB -

यह इनपुट json फ़ाइल है "" "{" कर्मचारी ": {" 14 ": {" नाम ":" जोन "," उम्र ": 12," जावा " गतिविधि ": {" गणना ": 3502," रेटिंगवैल्यू ": 5}}," 17 ": {" नाम ":" स्मिथ "," उम्र ": 23," गतिविधि ": {" गणना ": 232," रेटिंग वैल्यू ": 5}}}}} जावास्क्रिप्ट समारोह var परिणाम = []; (कर्मचारियों के लिए var कुंजी) {var कर्मचारी = कर्मचारी [कुंजी]; var item = [] के लिए (डीबी।) विवरण (डीक) {हर कर्मचारी = डॉक्टर शामिल हैं। कर्मचारी, अगर (कर्मचारी) ; मद पश (कुंजी); मद। पीश (कर्मचारी। नाम); मद। पीश (कर्मचारी)। आइटम। पुश (कर्मचारी। गतिविधि। गणना); आइटम। पश (कर्मचारी। गतिविधि। रीटिंग वैली); परिणाम पुश (आइटम। जोडा (","));}}}); प्रिंट (परिणाम); मुझे सीएसवी फ़ाइल को 5 कॉलम में लिखने के लिए चाहते हैं, प्रत्येक कॉलम में इस वैल्यू में मान होता है आईडी का नाम आयु गणना रेटिंग वैल्यू 14 john age 3502 5 17 smith 23 232 5...

python - Half-integer indices -

I am working on a liquid mobility simulation tool in Python. Traditionally (at least in my area), integer indices indicate the center of the cell. Some quantities are stored on the faces between the cells, and are marked by the half-integer index in the literature. In the code, however, they are moved to the integer so that they can fit into arrays. The problem is that the change is not always consistent: do you reduce or decrease? If you switch between adequate code, then you quickly lose track of conferences for a particular code. And honestly, there are enough bizarre conventions in every code, which will be a great help in destroying something ... but if this measure is worse than the original problem. I have also thought about using the index is strange for cell centers and faces, but it is a rival, as well as for the quantities present on both face and cell centers, this is rare If you do not use more than half your indices, you can implement function plus_half (i) and minu...

node.js - findarray in mongodb and output to array in nodejs -

I have an array inside the mosaics in the collection according to the below. ("53dbb05fa976627439d43884"), "employee": [{"Date": "1986-03-10"}, {"Date": "1986-12 -11 "}]} Now I have all the specific dates and outputs for the array in NodeJay format. var collection = db.collection ('employee'); Collection distance ('employee .Date') ToArray (function (mistake, docia) {console.log (docsa);}); }; The problem is that I will get the following error, but those collections can be run on the diestink command on the mangodeb. Can I avoid error in anyway? TypeError: Undefined The method 'toArray' can not be called or is there any way I can get the same output Can I use collection.find ()? you try collection.distinct ('employee.data') , But a collection called 'employee' I believe you want: collections. ('Date')

arduino - Assembly Stack Pointer AVR -

Hello friends have a quick question to me, but one I have not been able to answer yet. I appreciate some help with it: LDI R31, 0 I'm not sure what this does, but before that I Loading stack pointer is equal to high $ 08 and less than $ 5F (I know that this is the RAMEND definition for the end of memory for my Arduino). Can anyone please explain that what will happen to the stack / stack pointer? I know that the R31 is used as a high byte, but I'm not sure what it will do for the heap of my existing values. This is a very small part of my homework, but I think it is necessary to understand thanks! R31 is part of Z Register, an alias for RIS: R30 X, Y, and Z The indirect address of the registers is used by some assembly instructions. See LDI R 31, 0 set from 31 to 0. It has no effect on stack or stack pointer. It seems that you are looking at some assembly codes, especially near the beginning of the program, usually it is where the si runtime launches the s...

python - Zip list of scalars and lists -

मेरे पास एक टपल जिसमें दोनों स्केलर और सूचि हैं (25.6 9, [25.5, 2 9 .5], [0.00153, 0.0222], 0.0, [0.0410 9, 0.08877], [0.31393, 0.34876], [0.75, 0.63]) मुझे पहला ट्यूपल पर काम करें, जिसका परिणाम है: ((25,69, 25.5, 0.00153, 0.0, 0.0410 9, 0.31393, 0.75), (25.6 9, 29.5, 0.222, 0.0, 0.08877, 0.34876, 0.63)) पहली सूची पैरामीटर के एक संयोजन को दर्शाती है जिसे कार्यों को पारित करने की आवश्यकता होती है। मुझे इसे ट्यूप्ले के दो ट्यूपल्स में बदलने की जरूरत है ताकि प्रत्येक को फ़ंक्शन पर भेज दिया जा सके। मैंने ज़िप को देखा है , मैप , और itertools.izip_longest परन्तु प्रत्येक को तर्क है कि पहले से ही विभाजन हो। के साथ प्रयोग करना: & gt; & gt; & gt; एक्सएस = (25.6 9, [25.5, 2 9 .5], [0.00153, 0.0222], .... 0.0, [0.0410 9, 0.08877], [0.31393, 0.34876], [0.75, 0.63])> gt; & gt; & gt; ज़िप (* (यदि x वसूली (एक्स, सूची) अन्य x [x, x] x के लिए x)) # सूची (ज़िप (...)) में 3 पीई [(25.6 9, 25.5, 0.00153, 0.0, 0.04109, 0.31393) , 0.75), (25.6 9, 2...

Line breaks in XML not showing in browser but OK in view source -

I have created an XML file and one of the nodes contains the data that I have in line with a special way Rhymes / new lines: This should be the first line / it should be the second line When I load XML in the browser source But I can copy and paste the data with maintained maintenance. Although it is provided in the browser as much: This should be the first line, it should be a second line Any ideas? There is nothing in XML that will assist you with text formatting in the browser. If you want to format XML data in the browser, you should convert XML to HTML and apply the approved HTML tags, which will format the text as you would like it to be displayed.

c++ - Why does the only signed integer type causes overflow warning in clang -

The following simple code example causes a warning: Include # lt ; Iostream & gt; #include & lt; Climits & gt; Int b = INT_MAX + 1; // Warning: Overflow in Expression; The result is -2147483648 // type 'int' [-wigger-overflow] unsigned int a = INT_MAX + 1; // OK main () {std :: cout & lt; & Lt; B & L; & Lt; Std :: endl & lt; & Lt; a; } Why is there no warning in the second line with overflow? Is this a bug or do not understand anything? This is a bug, though the result is "right thing". And it seems that the operation has actually been unsigned prior to the operation, as far as I can tell. The warning is generated by this code, which clearly checks for unsigned and skips overflow check (clearly intended and included in the comment): /// The given integer operation, which is known for the needs of most of the bitwidth /// bits, and check the overflow in the original type (if that type was not a /// unsigned ty...

python - How can I extend a tornado template from a parent template by giving a path starting from template_path? -

I have set the template_path configuration variable in my template from the template folder. I have the following template in this folder: to expand register.html base.html admin / register.html I want Base.html so I have: expand {% "base.html"%} This causes the following error: IOError: [Aron 2] There is no such file or directory: '/ home / kj / lab / test / templates / Admin / base.html ' Obviously this is looking at the same directory with a child template. Of course I can get base.html from ../bas.html but I think it is better if I can give it the "full path" (in the sense of starting with template_path) Can anyone help? The way render works, I do not think it is possible is. When you give the name of the template to render the function, such as: RequestHandler.render ('admin / register.html') template_path / admin> to extended which is a operator , code Find the template in the admin direct...