Posts

Showing posts from April, 2015

javascript - How to add labels to js bar chart? -

How do I add a title, the name of the axis to the chart, and how to change the color of the y and x axis values: Charts data var baradata = {label: ["January", "February", "March", "April", "May", "June"], Dataset: [ Fillcolor: "# 48A497", stroke color: "# 48A4D1", data: [456,479,324,569,702,600]}, {fillColor: "RGBA (73,188,170,0.4)", stroke color: "RGBA (72,174,20 9.0.4 ) ", Data: [364,504,605,400,345,320]}] // meet bar chart canvas works = document.getElementById (" income "). GetContext ("2d"); // Draw Bar Chart New Chart (Revenue). Bars (baradata);

visual studio 2008 - TFS disables "Merge changes in Merge tool" option -

Image
I am using TFS 2012. But if any collision occurs in Visual Studio 2008, during the chikin or in the Lezst Edition, then merge multiple options into merge tools, locally overwrite, server etc. But sometimes I do not merge the merge changes and merge changes in merge tools and they are disabled I tried to find the reason behind it but in reality It did not happen when it happened. Regularly all options are enabled, so when these options are disabled? And how can this contradiction be solved? I think the merge for .frm file type is not enabled. You can choose Team Explorer, Team Foundation Server Settings by right-clicking on the server and source control file type from there. There you need to enable .frm extension.

python - Strange loops and append functions within them -

I was reading, so I found a strange loop which resets a list as "blank" and then adds a value to this list here what i mean: def drawFood (Self, food matrix): food images = [] color = enumate FOOD_COLOR for xnum, x (food matrix): Poor self Koapret and (xNum * 2) & Lt; = FoodMatrix.width: color = TEAM_COLORS [0] if self.capture and (xNum * 2) & gt; Foodmates.width: color = TEAM_COLORS [1] imageRow = [] foodImages.append (imageRow) for ynum, cell (x) in enumerate: if cell: # here is the food screen = self.to_screen ((xNum, yNum) ) Dot = circle (screen, FOOD_SIZE * self.gridSize, outlineColor = color, fillcolor = color, width = 1) imageRow.append (dot) Other: imageRow.append (none) Primary However, foodImages = [] and imageRow = [] are both food items. Reset to empty in each iteration of the loop, the list of food images is increasing. Is it possible because we have imageRow and imageRow list images of food to food images The list co...

Python packaging: catering to different audiences -

I am working on a Python package that includes two scripts using library modules and libraries. One of the scripts is a command line tool, which is printing some text and the other is a JSON API server. Looking at this situation, I look at three main audiences or use cases for the package: Library users: The main module is required module Want to test and slate for your code and access the script as an example. CLI User: The CLI scripts want to run the script every time and then do not need the API server, and probably do not care to access the script source. API Provider: Similar to CII user, but with API server script. Need a CLI script for quick testing. How can I structure this in a directory tree and in one or more delivery packages (possibly using setuptools)? The current source layout is as follows: main_folder README setup.py mypackage __init__.py # library function mymodule.py # for easy import into script __init__.py includes cli.py api...

c# 4.0 - How to add text and image in a column in Component One FlexGrid? -

I have used the snippet mentioned below to show the text with the image, though I am unable to display the image with it. Is the image path not accessible from code? C1.Win.C1FlexGrid.C1FlexGrid gAuditL = New C1.Win .C1FlexGrid.C1FlexGrid (); . . . GAuditL.DataSource = AuditLogVieweryDT; // This is a data source for (int i = gAuditL.Row.Fixed; i & lt; gAuditL.Rows.Count; i ++) / in the grid in the foreground line {string severity = gAuditL [i, gAuditL.Cols ["Severity "] Index] .toString () .; If (Severity == "Information") {this.gAuditL.SetCellImage (i, 0, Image.FromFile (@ ". \\ resource \ info.bmp")); This g.AuditL.SetData (i, 0, "notification"); } If (seriousness == "warning") {this.gAuditL.SetCellImage (i, 0, Image.FromFile (@ ". \ Resources \ warning.bmp")); This.gAuditL.SetData (Eye, 0, "Warning"); } If (seriousness == "important") {this.gAuditL.SetCellImage (i, 0, Image.FromFile (@ ...

outputting multiple things to a file powershell -

I have an array and a foreach loop, this is a thief through every element and receives all my information and It outputs it to a file-file text. Txt However, this only outputs the last element of the data, how can I create it so that all the data of all elements are in the file?

c - 0-1 knapsack brute force -

I can not seem to find the problem with the following code written with a pseudo-code: p [] with the advantages, array w [] weight, weight - maximum weight , number (number of items) receives and wal (coming back) . Please help! Thank you. I think this issue can be with dynamic array or loop > int bruteforce (int p [], int w [], int size, int weight, int val {int k , I, j, tempWyight, tempValue; Int * A = (int *) coloc (size, size); (I = 0; i & lt; pow (2, size); i ++) j = size for; TempWight = 0; TempValue = 0; While (A [J]! = 0 & J & gt; 0) {A [J] = 0; J = j - 1; } A [J] = 1; For (k = 0; k & lt; size; k ++) if (a [k] = 1) tempWeight = tempWight + w [k]; TempValue = tempValue + p [k]; If ((tempValue & gt; Wall) & amp; (tempWeight & lt; = weight)) val = tempValue; Return valve; } Uh! There are several things going on here: Please indent your code properly. Then you will see that you are losing crisp braces in two places: for bloc...

Expires date - amazon SDK doesn't work - C# -

I am writing a project to communicate with S3 - Add, Receive, Delete I AWSSDK version 2.0. Using 14.0. I try to add the file with the expiration date I try by the end of the header: the request. Header. XPier = new date time (2014, 4, 28, 12, 22, 0); In addition, I tried with metadata: request. Metadata.ed ("expired", "Mon, 28 Apr 2014 12:22:00 GMT"); Both of them actually added another key on the "Headers" tab in the S3 browser but the file was not deleted. Can you help me Are you

text - Finding the first number of a .txt file - Java -

I have separate .txt files, which should be read by java Then Java should give me the first number of the first line or if I say differently, the first number of the 4th word. For example: "AAAAAAA version 5.01" or "AAAAAAA B version 6.0.2" 5 or 6 result must be a number. I have tried some ways like bufferedReader with line.charAt, but I do not know how I can do it for my problem. What would you suggest? BufferedReader br = null; Br = new BufferedReader (new FileReader (new file ("C: \\ user \\ desktop \\ new2.txt"))); String line = null; While ((line = br.readline ())! = Null {string [] parts = line.start (... ....); println (""); First of all, just read the first line of the file. file f = new file ("your_file .txt "); FileReader fr = New FileReader (f); Buffered Reader BR = New buffed reader (FR); String First First = br.readLine (); Then the string array of words To get, split the line from the spaces...

angularjs - Grunt serve + PHP? -

I'm starting my first project with yo + grunt + angular.js. I have a service that requires reading some data from my server; I created it using the Angular $ http service. I have implemented a permanent web service (PHP, but this is Java, C, Perl, maybe ... it does not make any difference) that reveals the API to get the data. The server with which the victim works in my NG-App is currently (and probably will ever be) in the same way where the PHP Web service (via Apache) runs. I am surprised that this is an acceptable architecture ... I end up getting two different servers (Billing and Apache) on the same server ... and, always the output of my PHP service To add "access-control-permission-permission-origin-127.0.0.1" ...: - ( Is it possible to serve suffering from periods, for example? UPDATE : I speak about the stage of development ... Of course, to understand myself better on production ... In order to convince myself, I would like to use the related URL ...

c# - Update UI from code behind in real time -

I have created a socket listener, and I need to display a div (hide it, then it should be visible) , When the server detects a certain socket data. I have tried to use a thread, but it does not update the UI in realtime, only when the page is reloaded or if you post back. Here's an example of what I want to do, in this case I only want to update a text box with codebehand data, if possible, I would like to do this without AJAX, Javascript or jQuery. Code Back: Protected Zero Page_load (Object Sender, EventAgds E) {Thread T = New Thread (TestTread); T.Start (); } Private Wide Testthread (for (IntiI = 0; I Webpage: & asp: UpdatePanel runat = "server" id = "mypalan" & gt; & gt; ContentTemplate & gt; Lt; ASP: Textbox Runat = "Server" id = "MyTeckbox" /> The UI that you are trying to modify (modify client components) changes the code from the code (code back) in asp.net When on the server Sector...

python - Am I using classes and implementing functionality correctly? -

I have to create a listening server that will receive HTTP POST / XML alert traffic from a network sensor and parse the received XML. Being the beginner of Python, and having hard times understanding classes, I wanted to consult whether I am implementing classes and functionality, I am trying to get it right, and if better or " More Pythonic "Way It Is I hope that I am compelled to use classes to understand the better concept, I know that I can only use regular tasks. The script is so far: The xml.dom.minidom class to make the baseHttpSaver and the Socket Surface module, to create a threaded HTTP server, and to parse XML data. So far, I have two class sets - one for threading setup (Threaded HTTPPasser) and everything else (Threaded HTTPEx Handler). The "Everything" class is currently managing sessions and manipulating the data I think I need three sections, in the third to break the data manipulation and to manage the inbound connection except for the other...

maven - How to run the spring security samples from command line (instead of from STS)? -

I'm trying to run samples from This guide explains how to use an unsafe MVC sample Spring Suit Tool Suit (STS): How can I run a sample from the command line (instead of the STS)? I have tried to add pom.xml to the following -> project / build / plugin: & Lt; Version & gt; 2.2 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Path & gt; / & Lt; / Path & gt; & Lt; UriEncoding & gt; UTF-8 & lt; / UriEncoding & gt; & Lt; Host name & gt; Local Host & lt; / Hostname & gt; & Lt; Harbor & gt; 8080 & lt; / Port & gt; & Lt; Update & gt; True & lt; / Update & gt; & Lt; UseTestClasspath & gt; True & lt; / UseTestClasspath & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; is going on $ mvn package tomcat7: run but http: // localhost: 8080 / sample / browsing me an HTTP status 400 - request The syntax sent by the client was incorr...

Processing flat file using SSIS -

I have to process a successful file that contains a list of codes and sub codes, for example Subcoda 2 Subcoda 2 Codeb Subcodbi 1 Subcoda 2 Basically I need a code to code these two different code lists using code list A and B for two different tables using SSIS. Using ssis to relate each code to sub-code is a bit odd when I want to filter each code or sub-code separately, so the system is easy, but every code There is no easy way to relate your code without using a script component. Would it be better to use a net pure solution if I am using a script component? any idea? Or did I clarify something in the toolbox that can do the trick for this problem? I will load this data in a SQL table with an additional column with datatype = integer and Identity set This will give you an incremental row number for each line. Then I will type a complex SQL query to split the data, e.g. Code for B lines: SELECT * FROM Staging_Table WHERE Identity_Column & lt; (SELEC...

Push Notification for particular device in Android -

Hello in my application I want to send a notification to the specific device. Please tell me how to add this code to me. Many devices do their work, but I want to send them to specific devices. import com.parse.Parse; Import com.parse.ParseInstallation; Import com.parse.ParseUser; Import com.parse.PushService; Import Android.app; Application; Public class parse application increases the application {@ Override Public Wide On Critique () {Super. Connet ()); // Add your initialization code here Mercury start over; These, "YOUR_APP_ID", "YOUR_CLIENT_KEY"); //Parse.initialize (this, "", ""); . ParseUser.getCurrentUser () getObjectId (); . ParseInstallation.getCurrentInstallation () saveInBackground (); Parse intelliase (this, "C2XKDNMEElzMeghthd 9juS41FFF9Regice2EFX", "EL5VOX 8KMGFUAF 613D9PJLHVCM8AV7MTVV5HH8"); PushService.setDefaultPushCallback (this, abc.class); } Thanks, To:

javascript - jquery ajax dont works - succes and error -

PHP कोड काम करता है, लेकिन फ़ंक्शन सफलता और त्रुटि काम न करें $ ('# block-button-send') क्लिक करें (फ़ंक्शन () {$ .ajax ({url: 'code.php', डेटा: {मेल: $ ('# ('# ब्लॉक-टेल')। Val ()}, सफलता (ब्लॉक-ई-मेल ')। Val (), blok: "Název", नाम: $ (' # block-name ')। Val (), tel: $ (' # block-tel ')। ('# ब्लॉक-संदेश')। ऐडक्लस ('अच्छा')। स्लाइडअप ();}, त्रुटि: फ़ंक्शन () {$ ('# block-message' ) .appendTo ('Zprva Neodeslana')। AddClass ('बुरा')। स्लाइडअप ();}});}); धन्यवाद हालांकि आप यह नहीं बताते हैं कि सटीक समस्या यह है कि आप गलत फ़ंक्शन का उपयोग कर रहे हैं: अनुलग्नक को $ ('# ब्लॉक-संदेश') से जोड़ने के लिए Zpráva neodeslána तत्व का प्रयास करता है (जो मौजूद नहीं है)। आपको ऐप () , text () या html () इसके बजाय कार्य करता है। उदाहरण के लिए: $ ('# block-message')। पाठ ('ज़ेड्रा ओडस्लाना')। AddClass ('अच्छा')। ();

batch xcopy invalid parameters -

What am I trying to do to copy files from specific locations? Problem Xcopy tells me that I have invalid parameters I due to this fact I have not created a batch program before, I wanted to ask if it is possible to do this? set _pfadTarget = path \ test set_pfadSourceDesk = c: \ users \. \ Users \ xxxx \ Documents set _propertyDOC = \ * Dock REM ------- all DOC files -------- set _FullSourcePath =% _pfadSourceDesk %% _ propertyDOC% set: xxxx \ Desktop _pfadSourceDocu = c Set _FullDestPath =% _pfadTarget %% _ propertyDOC% xcopy% _FullSourcePath %% _FullDestPath% / S / y _FullSourcePath =% _pfadSourceDocu set %% _ propertyDOC% xcopy% _FullSourcePath %% _FullDestPath% / S / Y exit It breaks around empty space, and it seems that all your variables are affected. set spaces _FullSourcePath =% _pfSourceDesk %% _ propertyDOC% This method works well for the variable name, and around double quotes Allow long file and path elements in variable content. The quotation given bel...

javascript - Create objects on demand -

I am working in an information system for a web and I am not able to read the unread or read notifications of objects for every notification Get track, for example, I found something like this: var Notifications = function () {this.read = false; }; Notifications.protipipip.open = function () {alert ('opening'); } Notifications. Prototype Close = function () {warning ('off'); } Notification.prototype.fatchchinfo = function () {warning (obtaining information from the browser); } Notification. Prototype. Remove = function () {Warning ('Deleting information'); } Var Some Information = New Notification (); What I really want to do is create a resiebe like a new notification from a socket at all times: socket.on ('Notification' , Function () {var notification 1 = new notification ();}); And now if you make a new notification var notification 2 = new notifications (); I would like to know that I can create this notification objects with bi...

java - Maven Goals not running on Eclipse Indigo -

Image
I tried to run Maven targets from the command line and it was successfully executed. But when I throw it in the 'Maven 2 device' eclipse, But, My Maven is properly installed on the system. I am not completely sure how the path references here, I think that there is some thing in the eclipse preferences. According to some stackover flow post, I modified the embedded Maven version in my machine based version, added that path, updated the project configuration and refreshed it but there is still no luck. I do not know how to fix it. Eelipress> window> Preferences> Make Maven configuration using Maven > See also user settings, if its correct settings are Xml

function - Using variable for fieldname in postgresql -

I have a function where I can be able to use text variables as a field name in a post variable function Want to Clear _currentEmployee text; _ Mercant integer; Reserve to choose ... Loop _currentEmployee = _record.name _myCount = (TblTraining from SELECT count (*) WHERE tblTraining._currentEmployee = 4); If _mycount = 0 ... end loop; In fact, it is a routine to check the training records of each employee. The table schema has obvious issues because the employees are given the form of columns in the training table instead of the normalized id in each line. Is entered in, but I have to work with whatever I have found here. Whenever I use the function, this field names and processing, instead of changing it correctly, its _currentEmployee behaves. I get an error: _currentlEmployee tbl is not a training area Tips? Generally, parametric identifiers are not allowed in SQL. Performed by a dynamic SQL string in the PL / PGSUL function. Beware of SQL injection Column n...

Can I open/close a session in PHP multiple times (and if so what is going wrong)? -

तो मेरी लॉगिन प्रक्रिया कैसे काम करती है: authenticate.php sessionStart (); अगर (isset ($ _ सत्र) & amp; खाली! ($ _ सत्र ['LOCATION'])) {$ location = $ _SESSION ['LOCATION']; सेट नहीं ($ _ सत्र [ 'LOCATION']); } और {$ location = '//' $ _SERVER [ 'SERVER_NAME']; } Session_write_close (); sessionStart (); $ UserIsOnline = isset ($ _ सत्र ['आईडी']); session_write_close (); sessionStart (); अगर (! $ UserIsOnline) {// उपयोगकर्ता से डेटाबेस प्राप्त करें // उपयोगकर्ता का पासवर्ड मान्य करें $ _SESSION ['आईडी'] = $ उपयोगकर्ता- & gt; आईडी; $ _SESSION ['संयुक्त राष्ट्र'] = $ उपयोगकर्ता- & gt; संयुक्त राष्ट्र; // ... अधिक जानकारी} session_write_close (); हैडर ($ स्थान); बाहर जाएं(); सत्र का स्टार्ट फ़ंक्शन: यदि (session_id () == '') {session_name ('MyWebsite '); Session_set_cookie_params (86400, '/', $ _SERVER ['SERVER_NAME'], सच है, सच); session_start (); $ _SESSION ['L...

javascript - ftps module connects but hangs up -

I am using the module and I have been installed on Sigwin lftp. I'm having trouble because my node JS app looks like it's connecting properly but any of my commands are running, the documentation for the module is not very wide, so I'm trying to make sure I run it What can i do for I am ready to receive a file from the FTP site. Here's my code: var ftps = require ('ftps'); // ftps connection var ftp = new ftps ({host: 'test.ftpsite.com', user name: 'test', password: 'test', protocol: 'sftp'}); // View on remote directory console.log (ftp); Ftp.cd ('TestDir /') Obtain ('/ UploadTest.txt', '/cygdrive/c/Users/Administrator/UploadTest.txt').exec(console.log); Output: CMO-application-server & gt; Node app.js {option: {host: 'test.ftpsite.com', username: test ', password:' test '}, CMDS: []} In this output At the point, the app is just hanging because it is trying to run ...

sql server 2008 - Full text search is not working if search for characters anywhere in the string -

Image
I have created a full text search index on the client reference column, but it does not work if I use any type of characters Want to search for where in string? string = 'ABCDF' This will not work; where SELECT * offers ([client reference], '* BC * *') but if I use the prefix So it works. Select from which the proposal contains ([clientreference], '' A * "') Added Someone has so far mentioned that "this is not possible, you only Can search based on words, but can not search on the basis of characters within the word. " Any where in the '223' string? Select the client reference from client context 1 where the CNT ONTAINS ([ClientReference1], '* 223 * "') If you do not have too many text and / or many lines (millions of +), instead of instead of you use like While doing better service. * Select from proposals where '% re%' like a customer '

Install Light Table, worked for python then set it up for Julia now having problems with python -

I installed the light table and it used to work with my current set-up Python. However, once I set up Julia by modifying settings: user behavior , then it does not seem to work for me and to give me an error. It seems that the problem trying to connect to a project is that we have got: Python: File '' C: \ Program Files \ LightTable \ plugins \ python \ py-src \ Ltmain.py "'can not open: [Error 22] Invalid logic I have checked and file is available ltmain.py The only reason I think Julia can have a connection with is because it is the only change I made in the light table. Settings: User Behavior: app [(: lt.objs.style/set-skin "dark") (: lt.objs.langs.julia / julia-path "C: \\ Program Files \ Julia 0.3.0 -Previous \\ Bin \ \ Julia.exe ")] I know that there is a possibility of no connection with Julia, but any help can be provided which will be highly appreciated. See this problem in the Light Table Issue Tracker: Recommen...

java - Restriction on org.eclipse.ui.internal.* classes -

We are developing a modeling environment as a plugin for Eclipse. It is possible to modify one of the approaches given to the user in this environment, i.e. to hide / show objects in the coolbar, menubar and scenes. When you are not developing the entire RCP-application, but it is difficult to modify only a plugin's visible coolbar- / menu etc. I was able to come up with the only solution to add an entry rule in the way of making Java org.eclipse.ui.internal * The package was to be available and later using the item with the coolbar manager / menu manager in the following example: Workbenwindo Workbankwind = (WorkBankWindo) PlatformUI.getWorkbench (). GetActiveWorkbenchWindow (); Icoolbar Manager Coolbar Manager = Workbench Window. CottageManager2 (); IContributionItem [item] = coolbar manager .getItems (); (For IContributionItem item: item) {item.setVisible (wrong); } However, by adding this access rule and then pressing the "restriction" alerts on each call to...

c# - windows store app development using visual studio 2013 in windows 7 operating system -

I want to develop an app in Windows 7 operating system using Visual Studio 2013 I know that this work is possible if I am using the Windows 8.1 operating system. But someone can tell that it is possible with Windows 7 OS. On Windows 7, you can install VS for Windows 7. 2010 (full or express edition) must be used.

Keep the state of checkbox angularjs -

मेरे पास यह एकाधिक चेकबॉक्स है। & lt; div ng-repeat = "सेटिंग सेटिंग्स "& gt; & Lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "सेटिंग.नाम" एनजी-मॉडल = "setting.value" & gt; {{setting.name}} और नियंत्रक में $ scope.settings = [{नाम: 'OrderNr', मान: ''}, {नाम: 'ग्राहक' ', मान:' '}, {नाम: 'कैटलॉगनाम', मान: ''}, {नाम: 'ऑर्डर डेट', मान: ''}, {नाम: 'ऑर्डरस्टेट', मान: ''}]; जब मैं सहेजें बटन पर क्लिक करता हूं, तो मैं इस फ़ंक्शन को स्थानीय संग्रहण में स्टोर डेटा के लिए कॉल करता हूं $ scope.save Setting = function () {var json = angular.toJson ($ scope.settings); localStorageService.add ( 'सेटिंग', json); }; मैं पृष्ठ को पुनः लोड करते समय कैसे अपनी सेटिंग्स रख सकता हूं? कूकीज का उपयोग करने के बारे में क्या। असल में आप को यह करने की ज़रूरत है कि वह नियंत्रक में निर्भरता के रूप में सेवा को इंजेक्ट कर लेता है और इसे किसी ऑब्जेक्ट क...

php - Not getting cURL response -

जब मैं शीर्ष लेख का उपयोग करता हूं: $ url = 'http: //test.com /pay?login=160&pass=Test@123&ttype=NBFundTransfer&prodid=NSE&amt=50&txncurr=INR&txnscamt=0&clientcode=TkFWSU4%3d&txnid='.$string.'&date = '। $ तिथि।' & amp; custacc = 1234567890 & amp; udf1 = अजीएश & amp; udf2=test@ttr.com '; हैडर ('स्थान:'। $ Url); मुझे यह XML प्राप्त हो रहा है: & lt; MMP & gt; & LT; MERCHANT & gt; & LT; प्रतिक्रिया & gt; & LT; यूआरएल & gt; http: //test.com/pay< / यूआरएल & gt; & Lt; param नाम = "ttype" & gt; एनबीएफंड ट्रान्सफर & lt; / param & gt; & Lt; param name = "tempTxnId" & gt; 267040 & lt; / param & gt; & Lt; परम नाम = "टोकन" & gt; R2X% 2BE87UUszWqAz1xyWLJBlRhLuq7% 2B3NdKTuhOb% 2BbVw% 3 डी & lt; / param & gt; & Lt; param नाम = "txnStage" & gt; 1 & lt; / param & gt; ...

ruby on rails - Upload with Carrierwave doesn't work -

I use a form of upload file in my app. That's why I am in my correction scene and I make a partial call to make the sound, all my fields were hidden, I feel that when I click on my submit button, my upload process begins But nothing happened. I do not search my bug, can someone help me? My Corrections_View & lt;% = Form_new for improvement. Improvement | & Gt%; & Lt;% @ sounds_dmcloud.each do Dmcloud | | & Gt%; & Lt;% if dmcloud.retranscript == Incorrect% & gt; & Lt; Tr class = "muted" & gt; & Lt; Td square = "link_sound" & gt; & Lt;% = dmcloud.title% & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt;% = Correction Selection: corrector_id, hash [@ correctors.map {| U | [U.email, u.id]}], {: prompt = & gt; 'Choix delivery'} ,: class = & gt; 'Corrector_select'% & gt; & Lt; / TD & gt; & Lt; Td class = "data_state" data-stat = '50' ...

c# - Cannot convert lambda expressions to type 'int' -

Image
मेरे पास ASP.Net MVC 4 परियोजना में नीचे परिभाषित कस्टम सहायक है सार्वजनिक स्थैतिक वर्ग CustomHelpers {सार्वजनिक स्टेटिक स्ट्रिंग उपयोगकर्ता नाम एफआईआरआईडी (इंट प्रयोक्ताआईडीआईएलएयू) {// आईओएस डेटाबेस ऑपरेशन और यूज़र आईडी वेल्यू वापसी के लिए वापसी रिकॉर्ड "एबीसी"; }} मेरे दृश्य में मेरे पास कोड है @model ABC.DataAccess.Product @ CustomHelpers.UserNameForID ((model = & gt; model.LAST_UPDATE_BY )) उपरोक्त कोड इस त्रुटि को देता है: "लैम्ब्डा भाव को 'int' में परिवर्तित नहीं किया जा सकता क्योंकि यह एक प्रतिनिधि प्रकार नहीं है। हालांकि मैं परीक्षण करता हूं उपरोक्त कोड a @ CustomHelpers.UserNameForID (1) एप्लिकेशन को अपेक्षित के रूप में स्ट्रिंग ABC देता है। इस त्रुटि को हल करने के लिए कैसे? मैं मॉडल के LAST_UPDATE_BY में संग्रहीत मान पास करना चाहते हैं। मॉडल = & gt; मॉडल.LAST_UPDATE_BY एक तर्क से प्रकार अभिव्यक्ति & lt; ... & gt; उत्पन्न करता है। (नमूना देखने के लिए Html.EditorFor () । अपने CustomHelpers ...

sql server - What logic error do I have in this SQL check constraint? -

I spent the last night trying to find out what is wrong in the below check barrier. I want to apply the following rule: All the rows are blank or call 1 is not empty and only one of the other columns is not zero (if Call is 4 set, it must be set to true) I am able to insert rows only with call 1 set, but I want an error in return. Add table test table (call 1 varchar (10) faucet, cola varchar (10) tap, call 3 varchar (10) null, call 4 bit, tap) Obstacle x check ((call 1 is blank and call 2 is empty and call 3 is empty and call 4 is not empty) or (call1 is not empty and (call 2 is not zero and call 3 is empty and call 4 empty ) Or (call 2 is empty and call 3 is not empty and call 4 is not empty) or (call 2 is empty and call 3 is empty and Col4 = 1))) does not work with parallelism N: ULLs: Changing the table Add X check in the test box ((Call 1 is blank and Call 2 is empty and call 3 is empty and call 4 is empty) or (call 1 is not zero and ((call 2 is not zero and c...

c# - What's the best way to display on a browser running on a computer/tablet/cell a video stored on my IIS server -

I am storing some videos on my IIS server and now want to display them on the browser. I know that HTML5 is a video tag, but it does not know how many browsers it can use. I am also open to using a third party tool (if necessary). The video will need to be displayed on major browsers running on computers, tablets and cell phones. Sorry, one last point. Videos are currently encoded as H 264 and their size is between 50k and 200k. Any help will really be appreciated. Almost all major browsers support the html5 video element at this point

java - There is any way to change the Logger name path -

I am using the Java logger class and want to know if you want to output the name of the files as a generated class can change. Fixed logger logger = new log ("C: \\ trace"); Fixed FileHandler FH; Public log (string path) throws security Exception, IOException {logger.setUseParentHandlers (false); FH = new fileholder (path + ".log", 1024 * 1024 * 5, 5, true); 5 Logger's Logger. Edhandler (FH); } The output log is like this (Trace.log.0) and I need Traza.0.log or something like that. Thanks all. Specify generation numbers in your file pattern From the document: If no "% g" field is specified and the file count is greater than one, the generation number will be added at the end of the generated file name, after which the dot

windows - How to concatenate continuation lines in Perl? -

I have a CSV file that has this type of wire: ID1; Banana | Apple Oranges and I think every time a pipe occurs at the beginning of the line, the string will be added to the previous line, the output should be like this: id1, banana | Apple Narrow a pipe | ? Post-text "itemprop =" text "> A liner in a laugh removes the returns before pipes: perl -ne '$ s = do {local $ /; & lt; & gt;} $ S = ~ s / \ n \ | / | / g; print $ s' file.csv

html - CSS: is there any way to style an <ol> bullet so that it is circular and has a background? -

Image
इस सवाल का पहले से ही एक उत्तर है: 2 जवाब डेमो यह दिखाता है कि मैं क्या ' उदाहरण के लिए: & lt; ol वर्ग =" अरबी "& gt; & Lt; li & gt; चरण एक & lt; / li & gt; & Lt; / ol & gt; Ol.arabic {सूची-शैली: दशमलव; } ज़रूर, डिफ़ॉल्ट स्टाइल रीसेट करें और विभिन्न काउंटर का उपयोग करें शैली: ol.arabic {list-style-type: none; काउंटर रीसेट: ओएल-काउंटर; } Ol.arabic & gt; Li: पहले {content: काउंटर (ओएल-काउंटर); प्रति-वेतन वृद्धि: ओल-काउंटर; सफ़ेद रंग; पृष्ठभूमि: # 452073; सीमा-त्रिज्या: 140px; फ़ॉन्ट वजन: 700; चौड़ाई: 30px; ऊंचाई: 30px; स्थिति: रिश्तेदार; फ़ॉन्ट-आकार: 18px; रेखा-ऊंचाई: 28px; टेक्स्ट इंडेंट: 0 पिक्सेल; पाठ संरेखित करें: केंद्र; प्रदर्शन: इनलाइन-ब्लॉक; मार्जिन-सही: 4px; }

java - Pattern matching a string against a template string -

मेरे पास निम्न जानकारी है स्ट्रिंग टेम्पलेटस्ट्रिंग = "मैं% NAME% और I % PLACE% में रहते हैं; स्ट्रिंग इनपुट स्ट्रिंग = "मैं जॉन डो हूं और मैं न्यूयॉर्क में रहता हूं"; मुझे एक फ़ंक्शन लिखना होगा जो ऊपर 2 स्ट्रिंग्स में ले जाएगा और जोड़े के एक हैशमैप वापस करेगा। हैशमैप & lt; स्ट्रिंग, स्ट्रिंग & gt; ParseInputFromTemplate (टेम्पलेटस्ट्रिंग, इनपुटस्ट्रिंग) {// जादू वापसी परिणाम; } परिणाम होगा % NAME% (कुंजी), जॉन डो (मूल्य)% PLACE% (कुंजी), न्यूयॉर्क (मूल्य) किसी भी संकेत की सराहना की जाएगी। आप की जरूरत है जो निकालने के लिए नियमित अभिव्यक्ति का उपयोग कर सकते हैं। वैकल्पिक रूप से आप "%" पर विभाजित करने के लिए विभाजन () विधि का उपयोग कर सकते हैं। परिणामस्वरूप सरणी में हर दूसरे स्ट्रिंग एक टेम्पलेट var होगा। अन्य इनपुट स्ट्रिंग में त्याग करने के लिए स्थिर स्ट्रिंग होंगे।

Add-Contacts in each user accounts django -

Hey guys, I have created a messaging app in the DJ in which I have a user. Euth, profile and message app that works fine. Now I need to add the contact category to each user account. Can they add contacts like email with last name and last name? You should be able to update many to include multiple-to-many relationships with other users Profile Model for After that you can access the related user model for the profile of the given profile through that profile. In profile model: contact = model. Multilanguage (user) Set as empty / null is appropriate.

openframeworks - How to create a control flow? C++ -

First of all, sorry for the generic title, I did not know who wrote my question I am in a hassle, I am trying to make a control, but I do not know how to do it. Here's what I would like to do: I have created a chronometer (just an int that is incremented from 1 to 1) and I want to write it: if click click == 1 and the chronometer is less than 144, it Wait till reaching the number, if it is 144, then do it and take action, in the same way, if clickthrough is less than == 2 and the calender is less than 72, then wait until this number reaches, if the chronometer == is 72 Make and Action I Feel It To Do It can be so easy, but I do not know how to do it. Thank you all In case of events and objects, your problem is better . Assume that you have a chronometer and it has at least three parts: display, buttons and code. The display will show the value of the chronometer. The button button will behave as you describe the code that is the part that manages everything. Yo...

javascript - Shifting after dynamically adding a point creates a space in chart -

So I'm using high quality to plot every 1 second of real time data. After 40 points, being added to the chart, I start changing points. The problem is that I have more than one series in the chart and when this change begins, it creates a strange place in all the series except the first series. As you can not see blue on the same place in blue. setLiveDataPoint: function (data) {var graph = this; Var num = graph.yAxis.length; // Number of Y axis (field, quality) var yAxis = graph.yAxis; For (var i = 0; i & lt; num; i ++) {var xFieldId = "time"; // time for default var serie = graph.highchartObj.get (yAxis [i] .id); Var x = parseInt (data [xFieldId] [data.records - 1]); Var y = Data [yAxis [i] .id] [data.records - 1]; Var changes; If (graph.pointsOnGraph == 40) {shift = true; } And {shift = false; If (I == 0) {graph.pointsOnGraph + = 1; }} Serie.addPoint ({x: x, y: y}, true, variation); } Return graph; When I make a call, there is every data in the same J...

java - Why won't my SimpleDateFormat convert correctly? -

Image
मुझे स्ट्रिंग के रूप में मेरी तिथि है: 2014-06-23 22:00 दिनांक को java.util.date के रूप में प्राप्त करने के लिए मैं इसे SimpleDateFormat का उपयोग करके पार्स करता हूं दिनांक सूची दिनांक = नया दिनांक (); सरलडेट फ़ार्मेट एसडीएफ = नया सरलडेटफ़ॉर्मेट ("य्याय-एमएम-डीडी एचएच: एमएम", लोकेल। जीएमएनएआई); ListDate = sdf.parse (gameList.get (स्थिति) .getTime ()); लेकिन मेरा आउटपुट System.out.println (सूची तारीख) 2014-04 है -118 1 9 37 यहाँ क्या हो रहा है ??

excel - How to substitute multiple line feed with a single line feed -

I have this data wrapped in a single cell. This is a nightmare For my report formatting purpose, I have to reduce multiple line feeds. Whenever there are more than 2 line feeds between 2 strings, they need to be replaced by 2 line feeds. So data should be seen This is a nightmare I'm just getting started with Excel scripting. I tried to use the alternative function but could not get the correct result. Can there be looping using some options? Whenever there are more than 2 line feeds between the two strings, they are exactly 2 lines Need to be replaced by the feed. Use this short function: function customsubstit string (myStr as string) as customsubstitute = myStr while InStr (1, customSubstitute , CHR (10) & CHR (10) & CHR (10)) Replace customSubstitute = (Custom Subscriptions, Crow (10) & Crow (10) & Crow (10), Crow (10) & Crow (10)) Loop End function

javascript - Modifying widgets in an alloy project -

I have a widget that is a photo gallery. This basic functionality means that it only allows users to click on the thumbnails. And then extends expansion / extension on an onclick event. I need to expand the widget so that there is a button that lets the user change their profile picture accordingly (if they select that photo). Here's how widget looks in widget.js by default: var topView = Ti.UI. CreateView ({width: Ti.UI.FILL, height: Ti. UIFill, Xindex: 1200, view: wrong}); // This image gets, it combines the top view var imgView = Ti.UI.createImageView ({image: url, width: Ti.UI.SIZE, height: Ti.UI.SIZE}); // add it to topView.add (imgView); To add a button now, I can add the following widget.js: var button = titanium.u.create button ({title: 'Use picture, top: 10, width: 100, height: 50}); button. AddEventListener ('click', function (e) {Alloy.Global.Image = url;}); TopView.add (button); This will close the popup and return the URL of the image in...

c# - ASP.NET Razor Code - How to create begin-with logic true in conditional statement? -

I am trying to make an argument as if values ​​are starting with returns or with a specific value is triggered. For example - I think there is something similar to the term == similarity that gives reality If the values ​​are the same. @ {year == 2014 / April? "True": "wrong"} with this problem is month . I want that if year == 2014 then it is true with any month. How can I do this? Thanks! [edit] My question is clear, I want that 2014 anything will come when the return is correct. It looks like you want something: @ { Year == 2014 & amp; & Amp; Month == 4? "True": "wrong"}

actionscript 3 - Is there any way to avoid string leakage? -

I have a flex code in which I allocate value multiple times for a string variable. I expect the garbage collector to remove the memory associated with previous work, but it does not seem like that. Every time I make an assignment (memory by clicking on the image, which calls on the mouse room) increases with the profiler, and not only for the first time. Apart from this, it does not decrease. Here's the code: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; S: application xmlns: fx = "http://ns.adobe.com/mxml/2009" xmlns: s = "library: //ns.adobe.com/flex/spark" creationComplete = "doinit ()" & gt; ; & Lt; Fx: script & gt; & Lt ;! [CDATA [var backup: string; Private Function doInit (): Zero {img.addEventListener (MouseEvent.MOUSE_DOWN, onMouseDown); } Private Function onMouseDown (Event: MouseEvent): Zero {backup = getSubStr (); System.gc (); } Private function getSubStr (): string {va...

tracking - The position of objects inside object goes on changing - javascript -

I have a strange question, I have set up google publishing tag on my website. The key values ​​saved in the Google Publishing Tag can be typed directly into the console by typing directly into it: googletags.pubads () Now up There is an object in which various objects, methods etc. are included. However, from time to time, the location of a particular object is changed to googletag.pubads (). If the object or array I see inside google.pubads () is in today's situation, then like the few months, why will the place of the same object be "J"? In this way I access it in the console: var s = googletag.pubads (); Var q = s.i // Because the current object is in "i" though it changes after a few months. Or day I am using this item's value in many different places & amp; If the situation changes, then I have to change my code every time with the new object location. why will?

c# - Random Sentence Generator / Listbox output -

I am trying to create a Windows form in C # containing 5 random words Arrays are there in them Then I will use the words from the array to create a button to generate random sentences. Right now I'm trying to output sentences in a list box but I'm getting errors Listbox What is the code to output this information? Here is my code ... using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; System usage threading. Task; Using System.Windows.Forms; Namespace Chapter_16_ Ex._16._4 {Public Partial Class Form 1: Form {Public Form 1 () {Initial Group (); } Private Zero btnGenerator_Click (Object Sender, EventArgs e) {string [] Article = {"the", "a", "one", "some", "any",}; String [] noun = {"boy", "girl", "dog", "city", "car",}; String [] verb = {"gone", "jump...

algorithm - Insertion sort expenditure -

I have tried to prove that an integration with binary search needs to be sorted. Tried to use but i hung up t_w (1) = 0 t_w (n) & lt; = Log_2 (n-1) + 2 + t_w (n -1) and t_w (n) & lt; = N log n with n = 2 ^ k; Epiclon N I do not know how to solve it: t_2 (2 ^ k + 1) & lt; = Log_2 (2 ^ k) + 2 ^ k * log_2 (2 ^ k) how to go? Where's my fault Thank you for your help

javascript - AngularJS How to restrict double/multiple click -

I know that click and drag buttons on angular js for double / multi click; After completing AJAX processing by NG-Disabled, enable it, please suggest any other best way to deal with double click in angularJS ... Our code will call the Ajax method on button click & amp; ; The process will take small amounts; Get data from DB I do not have to allow Ajax to click on progress ... Welcome to NG-Handicapped, I am a learner of AngularJS createDialogService ( 'ajs / common / templates / popup / Config_reminder_popupkhtml ", {title: IsFrom, background is true, the controller:" ConfigRemindersCBController', FooterTemplate: '+ verb +'}); $ scope.saveOrUpdateReminder = function (reminder) {if ($ scope.isDisabled) {return; } $ Scope.isDisabled = true; if (! reminder.daysBeforeAfterCheckDate || reminder.daysBeforeAfterCheckDate === '') {alertService.openValidatPopup ( 'Enter before just days end. "," Error ", really,' Config...

html - JavaScript: Get next element from Parent -

I want to disable the next element of the parent of a tag: html: & lt; Period & gt; & Lt; Input type = "checkbox" onchange = "disableInput (this)" & gt; & Lt; / Span & gt; & Lt; Input type = "text" / & gt; & Lt ;! - When the checkbox is changed, disable the input field - & gt; Javascript: & lt; Script & gt; Function disable input (element) {element.parentNode.nextSibling.disabled = true; } & Lt; / Script & gt; Was it not working Can someone help me? Try it Next to the next symboling in the text nodes (including spaces) , But is not the next element sibling . function disable input (element) {element.parentNode NextElementSibling.disabled = true; }

javascript - Appending a block of CSS upon submit -

I have the following information that removes CSS classes and IDs, and posted them in the console Does. I want to type in a name in the top box, paste some code, and it is to generate a unique CSS id and classes in a new instance of the #classes example (which means uin0CE + A is bunch of squares in it). I have a posting for the console, I do not know whenever I add new, then how to "spawn" a new example of "code" # class section # codeName and the code is #codeInput . index.html & lt; Div id = "container" & gt; & Lt; Input id = "codename" class = "boxcaskingborder" & gt; & Lt; / Input & gt; & Lt; Br> & Lt; Textarea id = "codeInput" class = "boxcaking border" & gt; & Lt; / Textarea & gt; & Lt; Br> & Lt; Button ID = "Submit code" & gt; Submit & lt; / Button & gt; & Lt; Div id = "classes" & gt; & L...

java - How to scale image view with different scene size in javafx? -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब मेरे पास 1024 के साथ एक दृश्य है 600 ऊंचाई की चौड़ाई और मेरे पास इस आकार 1800x1022 के साथ एक इमेज है। मैं इस छवि को इमेजिव्यू में जोड़ता हूं और सेट फिटविथ & amp; कॉल करें। ऊंचाई मेरे दृश्य के साथ इसे पैमाने पर। लेकिन मैं चाहता हूं कि कोई एक बटन बड़ा आकार पर क्लिक करे तो छवि को नए आकार के पैमाने पर। कोई भी विचार? आप दृश्य के गुणों को चौड़ाई और ऊंचाई गुणों में एक हैंडलर को संलग्न कर सकते हैं ताकि किसी भी समय उपयोगकर्ता छवि के आकार में परिवर्तन कर सके (चाहे वह अधिकतम करने के लिए विंडो का आकार बदल सकता है ), आप छवि को गतिशील रूप से बदल सकते हैं: stage.widthProperty ()। AddListener (नया ChangeListener () {@ ओवरराइड सार्वजनिक शून्य बदल गया (ObservableValue ov, ऑब्जेक्ट पुरानावॉल्यूम, ऑब्जेक्ट न्यूवैल्यूज) {// यहां कुछ सार्थक सामान करें,}}); और उसके बाद उसमें छवि का पुनः आकार बदलने का काम करें।

onmousemove - Change value on mouse move, three.js -

मेरे पास यह क्षेत्र है var ज्यामिति = नया तीन। स्फीयर जीमेट्री (50, 64, 32); और मैं एक कोड बनाना चाहता हूं जैसे function onMouseMove (ईवेंट) {mouseX = (event.clientX - window.innerWidth / 2) / window.innerWidth / 2; माउस Y = (event.clientY - खिड़की। विजेताहैइट / 2) / विंडो.नरहाइट / 2; } प्राप्त करने के लिए SphereGeometry (50, MouseX * 64, MouseY * 32) लेकिन मुझे सही तरीके से नहीं मिल रहा है यह लिखो .. कोई मेरी मदद कर सकता है, धन्यवाद। अपने जाल की स्थिति को बदलें, और उसे पुनः प्रदान करें। Mesh.position.x = x; Mesh.position.y = y; Mesh.position.z = z; आप अपने म्यूसमोव को बाइंड करने के लिए ईवेंट का उपयोग कर सकते हैं: canvas.addEventListener ('mousemove', onMouseMove, true);

java - image not showing in JAR -

I have created an image that uses an image as the background of the image when I run it in the eclipse I work perfectly, but when I put it in a .jar file, the image is not displayed. I got the same posts and I tried the solutions but nothing worked. What am I doing here Private Zero Init () {setPreferredSize (new dimension (W, H)); SetVisible (true); Url = getClass () GetResource ("Graph2.png"); System.out.println ("value =" + url); Img = Toolkit.getDefaultToolkit (). CreateImage (url); } The manufacturer asks this function to initialize the GUI, then I ask this function to draw the image in drawing. Zero Initial Grid (Graphics G) {Graphics 2DG2D = (Graphics 2D) G; G2d.drawImage (IMG, 0, 0, this); } Not sure what the problem is that I tried to put the image everywhere, inside a bin without a folder inside the bin, inside the GII package, nothing worked. Does Thanks in advance The usual way to set this up is to Make your folders in Eclipse: ...

java - Applets opening separate consoles, driving me crazy. Leading to other issues -

Can a plugin cause the applet in a cached jar to open a separate Java console? I have 3 applets for a DDE server / client, which first loads the required files, the second server starts and the third customer initiates the client to send commands to the desktop app. The first and third applets are printed in the console and the second opens its own console. This is causing problems in the form of unbalanced links as the original DD Client Library is being used simultaneously. I know this is not much to move forward, but I'm stumped. UPDATE When I use JS Alert in the ASPT home in the JSP page the problem is fixed, see below. 1) index.jsp contains an applet tag for the InstallDDEFiles applet, cached plugin. When the InstallDDEFiles applet confirms that the required DDE libraries are placed in JRE, it sets a frequency variable installed = true . 2) $ (in the document)) .What do I call for InstallDDEFiles getter installed , and if true, then I DDester with do...

regex - Match HTML Element or Nothing -

मैं निम्नलिखित मिलान करने का प्रयास कर रहा हूं: & lt; h4 & gt; & lt; a href = "#" & gt; & lt; / a & gt; बार्टल, एसोसिएशन & lt; / h4 & gt; - & gt; & Lt; p & gt; ट्रैविस हाउस & lt; p & gt; & lt; b & gt; शहर & lt; / b & gt; : & Lt; em & gt; ऑस्टिन & lt; / em & gt; & lt; / p & gt; एन.बी. मैं निम्नलिखित regex का उपयोग कर रहा हूँ: ~ & lt;! -। (।? +) & lt; h4 & gt & LT; \ / h4 & gt; +।? (:। & lt; p & gt; (+))?।? + & lt; p & gt; & lt; p & gt; शहर के & lt; \ / b & gt ;. +? & Lt; em & gt; (। +?) & Lt; \ / em & gt; ~ यह ठीक काम करता है, लेकिन यह '& lt; p & gt; ट्रैविस हाउस' से मेल नहीं खाता है यह काम करता है: (।? +)।? (?।? & lt; p & gt; (+) \ n)? - ~ \ s + & lt; h4 & gt & lt; \ / h4 & gt + \ s + & lt; p & gt; & Lt; b & gt; शहर & lt; \ / b ...

Can I upgrade an Access MDE database to Access 2007 ACCDE format using VBA only? -

I would like to allow the user to upgrade their back end database manually using access Is this possible? I do not expect much from reading about this subject, but to confirm the expert it is impossible or hopefully solution > If you are actually limited to only MED / ACCDE format, then it seems impossible You can do this in an imperfect way, if you only use tables and questions , Is to create a new database in the desired format, and import tables and queries from the old database, the reason is that using the MED / ACCDE format, you can import form, modules and macros or import Can not be known. Error 29045: Description: "You can not import, export, create, modify or rename any Forms, Reports, Pages or Modules in an ACCDE, MDE Try to produce an error or ADE database. " If you are using only tables and questions, then depending on the example given in You can go ahead as follows (in my scenario, I have a new database sub I am not able to do yoga as the cu...

Convert Oracle Hierarchical Query To SQL Server -

I am data migration from Oracle to SQL Server 2008. I've got a scene in which the following questions: / P> Last ordered by SELECT limit_phrase, LTRIM (MAX (SYS_CONNECT_BY_PATH (res_val, ',')) KEEP (doer) , ',') aS concat_limit fROM (SELECT limit_phrase, SUBSTR (UPPER (RESULT_VALUE), 1, INSTR (RESULT_VALUE, '-') - 1) res_val as, ROW_NUMBER () over (range limits (SUBSTR by _phrase ORDER UPPER (RESULT_VALUE), 1, INSTR (RESULT_VALUE, '-') - 1)) as QRS, ROW_NUMBER () over (SUBSTR by Sima_fres order based on the border (UPPER (RESULT_VALUE), 1, INSTR (RESULT_VALUE, ' - ') - 1)) 1 As limit_fraz_tree is from lpe, limit_frease_ is Su lph WHERE lpe.limit_phrase = lph [identity] and lpe.comparison = 'P') GROUP BY border _phrase connect = first subject and Sima_abian = before connecting with limit_phrase = 1 curr; As you can see that some Oracle functions and monomox do not translate into SQL Server, for example, hierarchical queri...

Prevent the serialization of a specific field with protocol buffers -

I am considering using .proto files as a definition of my components in an organization-system architecture. This will keep things easy for the network serialization of my components but I have a request: Is it possible to stop any field from being serialized? An example would be a property component in which x, y, boodex, old man may need old and old for old purposes, but I do not necessarily need to serial those areas, Which are not used on the other side of the network. I need the flexibility of .proto files so what I want to do with the generating class, I will disregard the purpose of this, maybe I can do something at the protocol level? If I understand your question, you can specify a message to specify the field rules section Fields under "Optional" .proto file

Matlab - Save upon Key Press -

So, what I want to do here. Basically, when a certain key is pressed, then I want to leave a saved function (which thinks uisave to save all the parameters in .mat file) and how will I do it out of my script? I messed around with waiting, but it stops all progress; Unless this event is present, I want a script to continue running. Any help would be greatly appreciated. Use the 'WindowKeyPressFcn' property of to your figure. You can set it to point to one of your functions (where you can save): f = gcf; handle your window set (gcf, 'windowspress', @ myFun) or you enter a string directly, which will be executed: Set (GCF, 'WindowKeyPCN,' 'Disp (' Hello there! Have you pressed a key? '' '')) You 'WindowKeyReleaseFcn' Property too

python - Django: block internet connection for testing purposes -

Text after " I want to make sure my unit test does not try to connect to the Internet, there is an exception to increase Is there a way when they do? There was a similar question, but the solution included all the socket connections proposed there are databases, which are not acceptable for Django testing. One way to do this is to find out. You can paste in your settings if 'test' in sys.argv:. During the trial # block Internet access urllib2 import httplib import httplib2 def _raise_http_error (* args, ** kwargs) Import: urllib2.URLError increased ("I asked not to use the Internet") class AngryHandler (urllib2.BaseHandler ): Handler_order = 1def default_open (auto, request): _raise_http_error () opener = urllib2.build_opener (AngryHandler) urllib2.install_opener (opener) _HTTPHandler = urllib2.HTTPHandler urllib2.HTTPHandler = AngryHandler httplib.HTTPConnection.connect = Lambda self : None themeplib.HTTPSConnection.connect = lambda self: none. .re...

python - how to make a persistent connection to redis or memcache within a twisted server -

I'm trying to learn & amp; Understand how it works, I created a basic eco server, treats an input as the key for the data stored on the server, if The value will match the key 'key is not found' i @defer To work more with the .inline callback , the code is: twisted.internet "lang-py prettyprint-override"> Proto from the import reactor Call txredis.client import RedisClient REDIS_HOST = 'localhost' REDIS_PORT = 6379 square Echo (protocol protocol): Def connection created (self): self.factory.count + = 1 self.transport.write ('% d are clients' N '% self.factory.count) def data (self, data): clientCreator = protocol.ClientCreator (Reactor, RedisClient) D = clientCreator.connectTCP (REDIS_HOST, REDIS_PORT) def cb_redis_get (R, data): D = R J. (Data.stip ()) Diff Cb_result (x): If x: self.transport.write ('% s \ n'% x) Other: self.transport.write ('key not found \ n') d.addBoth (Cb_result) d.addClallback (cb_r...

ios - NSURLCacheStoragePolicy request vs response -

There is little confusion in understanding the caching mechanism in the iOS. I I want to customize my caching policy I am reading this blog. I want my caching to be completely controlled by my server caching header so I set [request set policy: NSURLRequestReturnCacheDataElseLoad]; The above mentioned blog now specifies that I can also specify a cash policy for NSCachedURLResponse. (NSCachedURLResponse *) Connection: (NSURLConnection *) connection will be CacheResponse: (NSCachedURLResponse *) Cached Response {NSMutableDictionary * mutableUserInfo = [[Cached Response User Infoda] MuteCopy]; NSMutableData * mutableData = [[Cached Response Data] MuteCopy]; NSURLCacheStoragePolicy storagePolicy = NSURLCacheStorageAllowedInMemoryOnly; // ... return [[NSCachedURLResponse alloc] initWithResponse: [Cached Response Response] Data: Migration Data User Information: mutableUserInfo storage policy: storage policy]; } Then what is the meaning of having a cash policy for the first t...