Sunday, 15 July 2012

c - determine if a process is dead or not - by PID -


I have two different ways to check if a process is still running:

1) GetExitCodeProcess () 2) Run the list of processes using CreateToolhelp32 snapshot () and check the PID

Now, in both cases I still find that I am using TerminateProcess A process that has ended with is alive, though it is not.

Is there a way to know positively whether the process is still alive or going through a PID? Thanks!

A call for GetExitCodeProcess back STILL_ACTIVE After calling on TerminateProcess for active processes, the process will die, and a different value will be returned.

Another way to check that a process is alive WaitForSingleObject . If you call it at the time of 0 processing, it will immediately return to WAIT_TIMEOUT if the process is still going on.


io - Interrupt driven HD44780 library for an Arduino -


I have an HD 44780 lcd screen, and I'm using liquid crystal libraries which is with the Ardino development package is available. However, it is not reliable I have seen some problems with it, and instead of being interrupted, just sleeps as long as the developer thinks that the chip should be taken to execute the operation.

From the Biscis flag, the Bissy flag will be set while it is executed, which means that it is possible to create an obstacle.

Does anyone know about a library that actually does this, and do all 8 bits need to be connected or can I put it on 4 pins?

I do not think you need a hindrance for this. Looking at Arduino distribution, you should just change the code Liquid Crystal :: Written 4bits , LiquidCrystal :: write8bits , and LiquidCrystal :: pulseEnable the wanted . The first two methods should start with the monitoring of the busy line (BD7) before writing the data, and the previous one will be modified to remove the 100us break.

I think the reason for this was not done by default. The code is that many users of these LCDs just bind R / W on the ground so that the display is always in written mode, from which the BSI signal It is impossible to read However, it is passed by setting _rw_pin to -1 in the library, so the pulse and the written code can conditionally be used as a way to engage the r / w pin as speed optimization.


sharepoint - Trouble with SPFieldLinkCollection.Reorder: Isn't working as documented -


I am working in a custom list that I created in SharePoint. I have a feature that has an event handler that closes when the feature is active. Private Zero Commandfield (SP Webb) {i // It works fine: I get the expected SPContentType object / / ContentTypes only in 1 SPContentType SPContentType contentType = Web.Lists [TASK_LIST_NAME] Content type [0]; ContentType.FieldLinks.Reorder (new string [4] {"field 1", "field2", "field 3", "field 4"}); ContentType.Update (); }

function which is OrderFields call web.Update (); as well.

Unfortunately, refinancing calls do not reorder my fields on my form. Do I forget something? Is there any suggestion that I can try something?

The problem was with my field names.

I had two lookups that I had previously created a program in the execution of program handler. These lookups' intrinsic names are significantly different from the names "field 1" and "field 2", which I gave them in the Name and StaticName parameters of my CAM definition.

Instead, the name of the display is made by the internal name, the blank space has been replaced by " 0020 ", and has been truncated to a length of 32 characters.


asp.net - SQL Server Session State, web farm, and IIS configuration -


So I have installed SQL Server session state using SQL Server 2008 and temporary database and today I look at data in it The table decided to find it only in the ASPStateTempApplications table:

AppId AppName
538231025 / LM / w3svc / 1 / root
611758131 / LM / w3svc / 3 / root
802488340 / Lm / and 3 S VC / 4 / Root
-940085065 / Lm / Y3 S VC / 4 / Route / WebApp
685293685 / Lm / 3 S VC / 5 / Route < Br /> 1210055478 / Lm / And 3 SVC / 5 / Root / webapp

We have 2 load balanced web servers

When I look at the web app ID of both servers then I think APP1 has 1 app with App4 and Web 2 in Web 1. The same thing happens with the second app in the web 1 is the app 2 with the ID of 1 and the web 2 has 3 id.

My general knowledge tells me that the web server sessions are not sharing because the session ID uses APIs, am I right? If so, why is it not so clear in this minor document? Should I match the IDs on both web servers?

The application ID is used during session creation, avoiding conflict from one app to another To help, it is created by calculating a hash of the IIS app path.

In your environment, the flow can be something like this:

  1. The server creates session IDs, sets it in a cookie, and some data in this session Stores (one line in ASPStateTempSessions) Session ID column is created by adding session ID to an app id.
  2. Server B receives a request with the session ID already present, and uses it to find session data related to ASPstatetampaign table. If the app ID is different, the generated key will also be different.

The net effect of multiple servers with different APIs sharing the same session is that the IDs created by one server won did not collide with them from other servers, and Machines will not see each other's sessions with different APIDs.


ASP.NET: the static instance will get volatile? -


If I apply a singleton, then insert it in the episode, for example by gc retrieved After each round-trip HTTP requests? Or is it still continuing in order? Thanks for any help.

Public Sealed Class Singleton {Static Text Only Singleton Example = New Singleton (); Static Singleton () {} Singleton () {} Public Stable Singleton Example {Receive; for example; }}}}

No, not every HTTP request. To prove this, I added a readable timestamp to the class:

  public readonly date time timestamp = date time.Now;  

And then it was referenced on a page in the project. It remains the same on each fresh.

You mention GC. Remember that when GC will retrieve an object (even not even GC.) I do not think the object will be retrieved. But I do not think this is a summary of your question.

Actually, yes your singleton will work as a singleton, at least until the application becomes recycled.


webcrawler in java or with j2ee as my final year project is good?How can I improve searchengine via webcrawler? What are the other features the best crawler have? -


This is for my last year's project. I want to design a web crawler, which crawls the pages I set for the given URL. I want to know how can I improve searchengine through WebWorld? I chose Java as my developing language. Is that good? What are the other features of webcrawlers? How can it help us in other ways? What are some other applications other than Search?

If your web crawler has not been delivered, it is not a web crawler.


IDoc Beginners tutorial -


संभव डुप्लिकेट:

हाय सब,

क्या कोई मुझे आईडीक पर एक अच्छी शुरुआत वाले ट्यूटोरियल बता सकता है? मैं मूल रूप से आईडीक प्रारूप को समझने की ज़रूरत है।

मैं googling की कोशिश की, लेकिन IDoc के शुरुआती परिचयात्मक ट्यूटोरियल को ढूँढने में सक्षम नहीं।

googling पर एक noob होने के लिए मुझे माफ करना।

धन्यवाद।

मैंने यहां एक समान प्रश्न का उत्तर जोड़ा है; < / P>

Google भाग पर पसीना न करें। वास्तव में वास्तव में बहुत कुछ नहीं है क्योंकि ओडीकल यूसीएम (पूर्व में छलनी) में आईडीओसी का प्रयोग किया जाता है

अफैक, शुरुआती लोगों को विशेष रूप से लक्षित नहीं है। पुस्तक / पीडीएफ से सर्वश्रेष्ठ शर्त को टुकड़ों की प्रतियां बनाने शुरू करना है (साइट स्टूडियो डिजाइनर के अंदर) और उन्हें काम करने के लिए किसका काम करता है।


ssh - git push heroku master permission denied on VISTA -


(Using Vista) I'm trying to clone an app from my GitHub repository and push it into a hierocoo I am giving Ok, so I have tried to create an SSH key several times with it:

  `ssh-keygen -t rsa`  

It seems like full Let's go the way I have it on my C: / user / *** /. SSP Folder Now I try to clone an app in Guitbah when I try to clone it on the rails_apps directory, I get a message

  Permission denied (public key)  

I found a solution on the net that I should run first:

  `ssh-add`  

So I tried to do this but it has said that:

The connection to your authentication agent can not be opened.

Then after some googling I find something about executing the ssh-agent. So I do this:

  `ssh-agent bash`  

And this line changes in line from my line:

  `bash3.1 $>`  

So I run:

  `bash3.1 $ & gt; Ssh- Add [path .ssh folder] ` 

and it successfully connects RSA private key (this does not work with id-rsa.pub). I have pasted the newly generated public key in my account account.

Now when I try to clone: ​​

`bash3.1 $ & gt; Git clone git@github.com: username / myrepo.git`

It is now successfully cloning Repo I in GitHub. Now when I have an app in my local repo, then I try to make an AOP application for him.

  `bash3.1 $ & gt; CD Myerepo '' bash3.1 $ & gt;  

And this code runs successfully Git remote successfully added Now I have to push what I have to do.

  `bash3.1 $ & gt; Gate has suppressed his master master. ' 

Balm! I get the error message again.

Denied with permission (public key)

I am very close to launching my app. But it just will not work, can you help me What am I doing wrong here? Thanks! : D

Note: Indication of your answer:

You need To give your key, there should be a command to do this. If you can not find it, then you have to contact their support.

For this, see (and also):

  myoku key: add ~ / .ssh / id_rsa.pub  

See more on that process.
You can then see a list of all the keys, including the name of the key, like: Note: It seems that you did not use sudo to create your keys, as "" shows up ( Where Harokee keys:

   is not working) 


More information about your SS key in your second.

  debug1: Trying Private Key: /.ssh/ Detect Debug 1: Trying Private Key: /.ssh/id_rsa debug1: Trying Private Key : /.ssh/id_dsa  

I'm not sure why this is / .ssh and otherwise the ~ / .ssh . Try to take your keypier on that path.


shouldn can not be:

  Git Push Original Master  

? By default, a reference to the clone repo is called 'original', not 'herooco'

what

  git remote -v show  < / Pre> 

display?

This is what you want, you can refer to the remote repo of its name

Prior Git Remote adding git@github.com: git_username / projectname.git < / Code>

asp.net - render .htm page into .aspx page -


<. Html>

In my .aspx page, I want to render a .htm page that has some data in .aspx page: < / P>

  & lt;% HTML.RenderPartial ("/ view / template / HTML_Temp.htm"); & Gt%;  

but it returns a runtime error:

Server error in the '/' application

No Build Provider Registered for Extension 'htm' You can register one in the machine.config or section in web.config. Ensure that there is a BuildProviderAppliesToAttribute attribute in which the value is 'web' or 'all'

How to solve this problem ... please

Try instead:

& lt;% = file. Read all text (server.MapPath ("/ visual / template / HTML_Temp.htm"))%>


user interface - jQuery Droppable: dropping outside div? -


Is there any way that I can get jQuery to execute a function when you have a drop out of a droppable div Drag the item?

We say that we have dragable or sortable items in a single divas and if they are left outside of their parent div, then you want to remove them.

I know that there is an "out" event but whatever works as soon as you drag the item out of the divas, when you do not drop it (release the mouse button).

Finally found a proper solution, even if it is a bit "hockey". What do I do, I set the foreground dish as droppable with dragables, but use the dropover and dropout features to ensure that the item is outside the foreground, when it is outside the divide, So I force the mouseup event to drop functionality. When it comes back I open the mouseup event, so it is not a fire.

Because while dragging, I'm already pressing the mouse button, releasing it is like falling into my hand. " ("Acceptable": "drag-able", tolerance: "indicator", out: function (event, UI) {$ (ui.helper) .mouseup (function () {doSomethingTo (ui.draggable);}) ;}, Over: function (Event, UI) {$ (ui.helper). Unbund ("mouseup")}}});


Consuming WCF REST service in multiple ways (.Net, plain XML) -


I am quite disappointed with WCF because I want to use this simple scenario:

  1. Provide a webservice with URImartplates such as / method / {param1} / {param2} / and a 3th parameter which is sent as a service to XML in the form of post data Please.
  2. Do not use plain XML, no SOAP overhead.
  3. Be able to produce a proxy in Visual Studio so that the service can be used easily on the net using a customer (here is no cares about Soap Overhead). / Li>

I can make 1 and 2. But the way I can not use 3. I tried to add both webHttpBinding and basicHttpBinding services; I changed my code to & lt; Services /> Fooled with the tag , but I'm not getting this job, what am I missing here ?!

N.B. I have examined this article: But there is nothing described here that works here ?!

You can not generate webhtml bindings and basic HTPIDP for client proxy uses SOAP there's no way. The questions that you are referring to enabling both bindings, you can not choose the features of your choice from every binding.

However, why do you want to create a client proxy? Microsoft. Using the HTML Library, calling your service is as easy as

  var client = new HTTP client (); Var content = HttpContent.Create (myXmlDocument); Client.Post ("http://example.org/param1/param2", content)  

wcf - Measure request time on server -


I want to set the time between two special moments:

  - the start moment The method will be called IDispatchMessageInspector .ReceiveRequest - After the end of the moment the method will be called IDispatchMessageInspector. In fact, I want to calculate the time that the service call is necessary to execute the user code. I thought that IDispatchMessageInspector is a good place to hook those two ways but unfortunately I do not know how to associate AfterReceiveRequest for the message related to the next response.  

Thank you.

There is a parameter inspector that I once wrote to measure the performance of my WCF service methods . Notice that one has been started and returned to the call before method that you get permission to get it in the AfterCall method in the parameter returns:

  public class PerformanceCountersInspector: IParameterInspector Opreshnnam Phlecol (string {public object, object [] input) {return Stopvockstart New (); } After public zero (string operation name, object [] output, object return value, object correlation state) {var watch = (stopwatch) correlation state; Watch.Stop (); Var time = clock Elapsed milliseconds; // do something with the result}}  

The difference here is that the time taken for using the parameter inspector will not take the time taken to serialize the input / output parameter. It will only account for operation time. If you want to include serialization times, you can use the correlationState also works in the method.


Update:

You Web. Configure the parameter inspector in the config. Behavior extension:

  public class PerformanceCountersBehaviorExtension: Wyvharvistaraktethnilement, IServiceBehavior {public override behave received {{return typeof (PerformanceCountersBehaviorExtension); }} Safe Override Object CreateBehavior () {This Return; } Void IServiceBehavior.AddBindingParameters (ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, Collection & amp; Lift; ServiceEndpoint & gt; endpoint, binding parameter collection Binding Parameters) {} void IServiceBehavior.ApplyDispatchBehavior (statements describing the service, ServiceHostBase Sewahostbej) {foreach ( ChannelDispatcher channelDispatcher serviceHostBase.ChannelDispatchers) {foreach (var endpoint in channel dispatcher. Andepoints) {foreach (diversified operation in the end. Dispatch time. operation) {var inspector = new protesters inspector (); Operation.ParameterInspectors.Add (Inspector); }}}} Void IServiceBehavior.Validate (ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) {}}  

And in your configuration file, you register the extension:

  & Lt; Services & gt; & Lt; Service name = "MyAssembly.MyService" behavior configuration = "ReturnFaults" & gt; & Lt; Endpoint address = "" binding = "basic HttpBinding" contract = "MyAssembly.IMyServiceContract" / & gt; & Lt; Endpoint address = "Max" binding = "MaxHttpending" contract = "IMAXADEXXchange" /> & Lt; / Services & gt; & Lt; / Services & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior Name = "ReturnFast" & gt; & Lt; Service debug includes ExceptionDetailInFaults = "true" /> & Lt; ServiceMetadata httpGetEnabled = "true" /> & Lt; Perf counter / & gt; & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt; & Lt; Extensions & gt; & Lt; BehaviorExtensions & gt; & Lt; Add name = "Perf quarter" type = "MyAssembly. Prformensupyogkrtautpadk extension, Mayasppand, Version = 1.0.0.0, Culture = neutral, Sarwajnikkitokn = null" / & gt; & Lt; / BehaviorExtensions & gt; & Lt; / Extensions & gt;  

c# - Get an application pool's Process ID using ADSI -


I've written a small device that lists all app pools in the box and allow you to start / stop / recycle Gives them I system The Directory Services have been used.

Now I am trying to write ProcessID for each AppPool for use in any other tool, but I am struggling to know where it is. Does anyone have any signs?

Thanks

I know this is not ADSI but I

APMCM list WP

WP "4404" (applicationPool: blah)
WP "6864" (Application Paul: Blabbl) WP "2976" (App Paul: Blblblah)

Then parse the result from result id.

The APCMD can be found in the System 32 \ inetsrv directory.


linux - How do you use AIO and epoll together in a single event loop? -


How can you combine the AIO together and get together in an event event loop?

Google has talked about a lot of things from 2002 and 2003 to unite them, but it is not clear if anything has happened or if it is possible.

Is anyone rolled up - with an Ipol loop using EventFord for AoOul Signal? Try the libevent:

Try both patches to support / div>


c# - Possible to pass format specifier for an argument as another argument to String.Format? -


For example, suppose I have a datetime format string in the string variable, there is no syntax or method in it. In the net, let me do this invalid code:

  string line = string.format ("{0: {1}}", date time., Now, datetime format); ^^^ ^ | | + - It will use - +  

I think dynamic parameter

You will have to use 2 phase system in any way, either by preferring your date or formatting string. But I think the problem will be worse than both.


Java Web Service for .NET 2.0 Client on Linux (Fedora) -


I used to work with creating a Java Web service for a .NET 2.0 client.

What will be your suggestions for the implementation?

The solution does not need to be overwhelming (I believe that a full Java EE container is not needed) but do you think it is the best solution? I have thought of using Glassfish v2 with the jacks-ws annotation (@WebService), and JXAB XML bindings (like @ XMLElement), which I think the net client would be able to consume?

  1. Has anyone tried this scenario?

  2. Will the glassfish be opaline, because I'm only using the web service as a mechanism for windows. Linux box, the built-in application is extremely small.

Any suggestions are welcome :)

Thanks,

James

PS Other Note - Will you use Axis / CXF instead of a glassfish? Would you use servlet containers like tomcat? e.t.c.

I have used Axis 2 and it works. I had the same problem of creating data expoing APIs (web service in my case) in Java.

I used the Web service and access to Axis 2 and Spring (to access the database) and WSDL was created through Axis 2 was easily eaten through the ASP.NET application through its web web service The dialog box and related proxy were created easily by the class.


WCF Service with .NET 2.0 and Java Clients -


My WCF service is full with .NET 3.5 and I have used wsHttpBinding when applying my service.

The .NET 3.5 client was no problem, but there were issues with .NET 2.0 and Java clients. WsHttpBinding

In this way I added a similar closing point with basic HTML. With similar security wsHttpBinding in mind with the following criteria:

  • I would like to use custom username / password validation, while Transport Security is enabled.
  • Windows authentication is not possible.
  • I do not want to add custom header authentication in SOAP messages.

My basic HTTP binding configuration is:

  & lt; BasicHttpBinding & gt; & Lt; Binding name = "MyService.basicSecureBinding" & gt; & Lt; Safety Mode = "TransportWithMessageCredential" & gt; & Lt; Transport Customer Credential Type = "None" Proxy Credential Type = "None" /> & Lt; Message Customer Credential Type = "UserName" AlgorithmSite = "Basic 128" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / BasicHttpBinding & gt;  

and the Service Brewer has been declared as a custom usernames widetter class.

But it seems that "TransportWith Message Credential" can not be used from Net 2.0 client and to enable custom user validation

I think you should use on the Net 2.0 side.

This link can help you:


design pattern asking for advice: push model v.s. pull model -


There are many workers in my application (working on different things as separate processes) and some resources (work unit ). Different workers need to work together. For example, I like W1, W2 and W3, Work unit U1 and U2, as workers. Then W1 requires a process on U1 and U2, which is similar to W2 and W3. Restrictions Different workers can not work on the same work unit at the same time.

I have two designs and want to ask for advice which is a better one.

  1. Push models: By using a central job scheduler to assign different workers to work units, to ensure that different workers do not work on the same work unit are doing;
  2. Drag the model: Each worker will ask a central job scheduler for the work units to process, and the job scheduler will select a suitable work unit which is not being processed by the other worker for the inquired worker is.

I want to know the pros and cons of each design. And one of my biggest concerns - loose coupled design (this is my main goal, but not the only goal). I'm not sure that better suitability in push models or pole models (option 1 is more loosely coupled)?

Thanks in advance, George

In addition to this, the "bridge" model can be more "decoked" because the variable of "load" is kept locally, whereas in the "push" model Needing a communication protocol (and overhead) to communicate this state to someone Will.


Think about the success of the "bridge" model in the auto industry: it went from the traditional "push" model where the goods are difficult to track and now the successful and ubiquitous "bridge" model


When it comes to scaling, you can create an intermediate layer of "scheduler", which is "voting" base workers for jobs from the above layer, now in a divided way the intermediate layer Can interact with


Note that a model requires coordination communication protocol: this is the nature of the coordinate protocol It is different in "push model", each worker's "load" Factor "is an additional control loop required to report / report a poll. As a scale of the system, more bandwidth is required, more state on the scheduler side, greater latency etc.


reporting services - SSRS Row Group + Column Group = RowNumber Issue -


I am returning with another SSR question: -)

I deal with survey data I have a process that calculates the reaction of an organization according to each question. Therefore my report is defined as the row for the column column and the group of the organization on the group. Both the organizations and the number of answers are variable, it is working as expected, I have tried to add a line list next to the organization so that I can show the rank, but the fact is that in each organization there is a question per line, This means that I'm getting eight lines per line.

Here's an example:
chart

My report definition is:
chart
Rank expression is currently: = Row number (nothing)

Ideally, rank 1, 2, 3, 4, etc. will be ... I tried the row group, column group and nothing else is. no help.

Any help would be greatly appreciated!

That was a disappointing problem; Lots of time wasted Finally, this solution also helped:

  = Running value (Count Distest ("YourTableName"), Calculation, "YourTableName")  

Here is the name of the group within the table / matrix, but the name of the table is self and yes, someone thinks that the function should use the table name for the scope in RowNumber, but it does not.


java - Encoding cp1252 -


जब मैं निम्नलिखित में जावा में कोशिश करता हूँ:

System.out.println (सिस्टम। GetProperty ("file.encoding"));

मुझे एन्कोडिंग के रूप में cp1252 मिलता है।

क्या यह पता करने का कोई तरीका है कि यह कहां मूल्य से आ रहा है? (पर्यावरण चर या कुछ चीज़ों की तरह)

मैं कमांड प्रॉम्प्ट पर एन्कोडिंग का मान कमांड जैसे विंडोज एक्सपी पर सिस्टमइन्फ़ो का उपयोग करना चाहूंगा।

सीपी 1252 एमएस विंडोज के अंग्रेज़ी इंस्टॉलेशन पर डिफ़ॉल्ट एन्कोडिंग है (माइक्रोसॉफ्ट एएनएसआई के रूप में संदर्भित करता है) जावा डिफ़ॉल्ट रूप से सिस्टम लोकेल को इसके डिफ़ॉल्ट वर्ण एन्कोडिंग के रूप में ले जाएगा। इसका मतलब क्या है प्रणाली निर्भर सामान्य तौर पर मैं डिफ़ॉल्ट एन्कोडिंग पर भरोसा करना पसंद नहीं करता। यदि मुझे पता है कि मेरा टेक्स्ट शुद्ध होगा तो मैं इसे अनदेखा कर सकता हूं - अन्यथा मैं InputStreamReader , आउटपुटस्ट्रीम वाइटर , स्ट्रिंग आदि या कॉलिंग getBytes

ध्यान दें कि cp1252 नहीं विंडोज कमांड प्रॉम्प्ट पर डिफ़ॉल्ट एन्कोडिंग है। यही पुराना सीपी 437 है, जिसे आप chcp कमांड का उपयोग करके देख सकते हैं (और बदल सकते हैं)।


functional programming - Can I have a co-routine of three functions using continuations in Scheme? -


Is it possible to add another function procC here so that the sequence of evaluations is procA-> procB-> procC-> Proca ... ? Display in

  (proca another-fun) (loop (n5)) ("proxy a \ n") (set! / Cc other-fun) (when (& Gt; n 0) (loop (- n 1))) (define (another-funny) (loop (n5)) ("in process B" (n) () () (- (1) -  

  (lwp) ((- n 1))) () () ( 
"Programming language") - Define the list) ();; Highlighter becomes confused (define lwp (lambda (thumb) (set! Lw-list (adp lwp-list (list thumb))) (start Define the inside (Lambda () (Let's ([PLW-list]] (set! LWP-list (CDR LW-List) (P))) (Define Pause (Lambda) CC (Lambda (K) (LWP (Lambda) (K # F)) (Start ()))) (LWP (Lambda () (f () (Stop) (Display "H") (F)) (LWP (Lamb () (stop) (display "E" (F) () ()) (LWP (lambda () (f (p) (displayed "y") (f) ) (LWP (l (w) (f (p) (f (p) (display "!") (F))) (LWP (lambda (f (p) (pause) (newline) (f)) ) (Starting) Hey! Hey! Hey! Hey!

sql - Query driving a view and actual view not returning same results -


I have a view that is returning four columns of data that can be pushed to external programs. When I only query the view ("select schema. With Visiting_name *") I get 10353 rows, when I run the actual SQL, I created the scene (I literally imitated and pasted what Oracle had stored, at least " Create or Replace "statement), I get 238745 rows.

Any idea why this can happen? Best guess: When you run the query standalone you are not seeing it in the same schema created in

SELECT ). The schema where you are running a query is either the name of one of the base tables in your table, or one of the names in the synonyms that has another view in which only one sub-group of rows is built-in Table


SQL select statement to find ID's that occur the most -


मूलभूत SQL कथन प्रश्न -

मेरे पास एक टेबल (मेरे यूज़र) है जिसमें स्तंभ "UserID " एक ही उपयोगकर्ता आईडी इन पंक्तियों में एक से कई बार प्रदर्शित हो सकती है। मैं एक ऐसी क्वेरी की तलाश कर रहा हूं जो मुझे विशिष्ट यूजर आईडी वापस देगा जो कि इस तालिका में सबसे ज्यादा दिखाई देती है, और उनकी गिनती के साथ भी। कोई भी विचार?

धन्यवाद अग्रिम!

  चुनें यूजरआईडी, गिनती (यूजरआईडी) यूजरआईडी द्वारा गिनती (यूज़रआईडी) द्वारा  युगल आईडी से  आईडी 

c# - Converting Linq MemberExpression lambda to work on class with reference -


For this question, I have a standard structure of the product (with an inactive flag) and order items ). I also have a query builder, which generates Linq Expressions used to query the products. A sample filter allows a user to search for active / inactive products, such as a Linq expression that generates:

  expression & lt; Func & lt; Product, bool & gt; & Gt; TestProductActive = Product = & gt; ! Product.IsActive;  

I want to take that expression and use it IQueryable & lt; OrderItem & gt; I will call it expression.Invoke with in-store archives:

  public static expression & lt; Func & lt; TDestination, TResult & gt; & Gt; (TDSART, TRSULTA & gt; DTSARS, TRSUATAT & FTC & lt; TDSTINATION, TSOSA & gt; RESOURCES FORM FORM DESTINATION) {PARAMETER EXPRESSION Para = Expression. Parameter (typef (TDSTINATION), "ARG"); Expression is called GETSource = Expression.Invoke (getSourceFromDestination, Ultimate); Expression was called OriginBody = expression. Invoke (@ this, invocatedGetSource); Expression & lt; Funk & lt; TDSTINATION, TRASHTTT & gt; & Gt; Result = expression. Lambda & lt; Funk & lt; TDestination, TResult & gt; & Gt; (InvokedOriginalBody, Ultimate); Return result; }  

Which calls I will call:

  Expression & lt; Funk & lt; Order itam, bull & gt; & Gt; TestOrderItemProductActive = testProductActive.Translate & lt; Product, OrderItem, bool & gt; (OrderItem => orderItem.Product);  

But NHibernate.Linq (and I have seen in the question, Linq to Entities) does not support the expression. Invoke .

Is there a way to take member expression from testProductActive and call it ! OrderItem.Product.IsActive ? Turn on


? Example of real life, I have expression and lieutenant; Function & lt; Product, bull & gt; & Gt; will be the view of expression which will be required to convert all. I have now got my filter to generate expression for both types of records, but I would love to leave the repetition and do this by changing the code of a filter Without a different type of record can be used.

This is not a very similar vein in the form of your proposal, but


c# - Can't add a record twice with Linq to SQL -


In the heritage system, I want to add the same record twice in a table.

There is an identity on the table which increases with each new record.

If I do the following, I get an error: "Can not add an existing entity"

Is there any other pricing snapshot object Is there any way to add a record twice without making it?

  Pricing Snapshot pricing snapshot = new pricing snapshot {invoiceorder leaderid = invoiceorder lines id, grosspayment = gross total, created = "price engine", created date = date time.Now}; DBpostChanges.PricingSnapshots.InsertOnSubmit (pricingSnapshot); DBpostChanges.SubmitChanges (); DBpostChanges.PricingSnapshots.InsertOnSubmit (pricingSnapshot); DBpostChanges.SubmitChanges ();  

For the first time after the change, you will have to create a new pricing snapshot object, your The object pricing snapshot is still present and the ID is now assigned to your table. So if you were trying to reach the ID of the submitted object for the first time, you will get one of it, so adding a duplicate will be added to it again in the table.


Parse Rails console output into Excel -


Maybe there is a strange question Model.all or I like to make some beautiful output of the array, [# & lt ; Model ID: 5, Name: "Blahblah">, # & lt; Model ID: 5, Name: "etc" & gt;] . Is it an easy way to convert it into a CSV / Excel format with properties in columns?

Yes.

Use the fast CSSV gem to create CSV from your list of models.

But this is not a good way to do it automatically. So you should add a class method to your model that produces CSV from an ARR.

Example:

  class models & lt; ActiveRecord :: Base requires 'FCSV' def self.to_csv list csv_string = FasterCSV.generate do | Csv | Attributes_for_csv = [: ID ,: Name] CSV & lt; & Lt; Attributes_for_csv.map {| One | A.to_s.titlize} list.each do | Item | CSV & LT; & Lt; Attributes_for_csv.map {| One | Item.send (a)} emd end ... end model. To_csv Model.all  

Warning: this will not be correct, you are still going to get a string and ". But starting and ending quotations is very easy.


.net - Is there any good ORM for VistaDB? -


I am looking for a good ORM for the VistaDB database. This is for a small desktop application and it can expand in the future.

Open source solution will be given priority, but if necessary I am ready to open.

Regards,

Development

mentioned in a comment Development Mandate Light Speed ​​and request was made for a link I would post it as a reply: -)

Mindspeep LightSpeed ​​both supports VistaDB 3.x and 4.x.

I hope that helps.


What is the Learn tag used for in AIML -


I am developing a small AML engine, and I am having difficulty understanding that & lt; Learn & gt; is for the tag.

If I understand correctly, is it only to point out an external AIML resource, which can be integrated into the current Ruleset?

Yes, that's right.

See:


Creating a rectangle with vectors and points in java? -


I have given an assignment to create a square that defines 2 points and then create a square that is given to vector Defines then create a square which defines a rectangular (4 vectors) before this assignment was given to me to calculate the length of a vector to create a point and vector square. I have 100% marks on that assignment, so I know that I can use that code to help me create this rectangle.

In this present assignment, make a rectangle square and calculate its circumference and area. I have spent some time in creating my rectangle class, but every time I feel that it looks correct, it throws the load of compiling errors.

Anyway this is my last code which is using to help me for the rectangular class:

Point class:

  public Square point {private double x; Private double y; Public point () {x = 0.0; Y = 0.0; } Public point (double A, double b) {x = a; Y = b; } Public Double GetV () {return x}} Public Double GetY () {return y;}}  

Vector class:

  public square vector { Private point P = new point (); Private point q = new point (); Public vector (Point A, Point B) {p = a; Q = b; } Public double giveLength () {double xDiff = q.getX () - p.getX (); Double yDiff = q.getY () - p.getY (); Return of Mathematics (SRD) ((xDiff * xDiff) + (yDiff * yDiff)); } Public Double giveLength2 () {Double x2Diff = p.getX2 () - q.getX2 (); Double y2Diff = p.getY2 () - q.getY2 (); Return Math.sqrt ((x2Diff * x2Diff) + (y2Diff * y2Diff)); }}  

Assignment 7 class:

  import java.util. *; Import java.math. *; Import java.io * *; Class assignment 7 {Public static zero main (string [] args throws exception {double x 1; Double Y1; Double X2; Double Y2; Point P1; Point P2; Vector V; Scanner = new scanner (System.in); System.out.println ("Please enter a filename:"); String filename = in.nextLine (); File inputfile = new file (file name); Scanner reader = new scanner (input file); While (reader.hasNext ()) {X1 = reader.nextDouble (); Y1 = Reader NXD double (); P1 = new point (x1, y1); X2 = Reader Nxt double (); Y2 = Reader NXD double (); P2 = new point (x2, y2); V = new vector (P1, P2); System.out.println ("X1" + X1 + "Length" + V.giveLength ()); }}}  

Input file format:

  xyxyxy  

Below is what my current rectangle looks square , But many of its constructor errors are to be thrown.

  square rectangle {private vector w = new vector (); Personal vector x = new vector (); Personal vector y = new vector (); Personal vector z = new vector (); Public Rectangle (Vector A, Vector B, Vector C, Vector D) {w = A; X = b; Y = c; Z = d; } Public double de premium () {double perimeter = ((w.giveLength () + x.giveLength2 ()) * 2); Return circumference; } Public Double Do Area () {Double Area = (w.giveLength () * y.giveLength2 ()); Return area; }}  

Thanks for helping in advance!

Please try the 4 vectors to get started here:

  Private vector w = new vector (); Personal vector x = new vector (); Personal vector y = new vector (); Personal vector z = new vector ();  

But you do not have a logic with no vector constructor!

There is no point in creating a non-digit vector. What you want to do, first read in the coordinates and set your 4 points, then after your points are determined, create 4 vectors from the points (well, 2 each).

Then ... announcements for this private below where your points are already set up, and put a pair of points in each group of each parenthesis.


c - How can I understand that the user pressed which keyword? -


I am doing a terminal coding like Linux terminal with Linux terminal and I need to quit the program when the user press ctrl + D keyword But I do not know how the user has pressed these keywords, thanks for your help.

I am getting input with fgets ()

Ctrl + D The end-of-file is In that case, fgets () will return an empty pointer.

Then, the main loop of your program might be able to see something like this:

  four buffers [2000]; Const char * input = fgets (buffer, size (buffer), staden); Whereas (input) {do_something_with (input); Input = fgets (buffer, size (buffer), staden); }  

Note that this only works for simple buffer inputs. For information about low-level keyboard handling, see


windows - Drawing with c++ visual studio 2010 beta? -


Please tell me that using a Visual Studio 2010 with C ++ language, a shape (for example a small square How to draw? STEP BY STEP I do not know what type of file to choose or how to check it

< P> I think you mean drawing in Win32? I suggest you check it out:


html - How to access a form drop down from Javascript -


Is there a way to use a drop down option text using Javascript?

For example, by assuming I can access:

  document.getElementById ("transFrom"). Values;  

But I want text between the option tag.

Here's the HTML drop-down for a form:

  & lt; Name = "transFrom" id = "transFrom" style = "width: 300px;" Select Tabindex = "1" onfocus = "valid valid_field (this)" onchange = "valid valid_field (this)" & gt; & Lt; Option value = "" & gt; Choose an account & lt; / Option & gt; & Lt; Option value = "S" & gt; Savings & lt; / Options & gt; & Lt; Option value = "c" & gt; Checking & lt; / Option & gt; & Lt; Option value = "m" & gt; Money market & lt; / Options & gt; & Lt; / Select & gt;  

Try

  document.getElementById (" TransFrom "). Option [document.getElementById ("TransFram"). SelectedIndex] .text  

Index safety when using C# indexers? -


I am coding a vector square in C # and felt that the indexers would be a good addition. Need to worry about the index being out of range?

Perhaps a code sample would be obvious:

  square vector 3f {public vectors 3f (float x, float y, boat z) {this.x = x; this. Y = y; This.Z = z; } Public name X {get; Set;} public float y {received; Set;} public name Z {get; Set;} public this [insot] float {{switch (pause)} {case 0: return it. X; break; Case 1: Return it back. break; Case 2: Return it. break; }} Set {switch (pause) {case 0: this.X = value; break; Case 1: This Y = value; break; Case 2: It's Z = value; break; }}}}  

Should I put the default case in my switch statement? What should it do?

EDIT: This is a silent question, the code above will not be compiled even without the code default plus Jason is superb under implementation.

This is very clear and eliminates the need to worry about range investigations: Public Enum Coordinate {X, Y, Z} floats this [coordinate coordination] to the public {{switch (coordination) {Case Coordinate. X: this return.X; Case coordinates Y: Back it up Y; Case coordinates Z: Return this .Z; // Explain to the compiler that we have covered everything by default: new logic: throwoff exception ("coordinate"); }} Set {switch (coordinate) {case coordinates. X: this.X = value; break; Case coordinates Y: It Y = value; break; Case coordinates Z: this.Z = value; break; }}}

But note that the coordinates are already public, so what does the index mean?


C# - Linq-To-SQL - Issue with queries -


I'm just frustrated right now I'm having a problem with LINQ-to-SQL, almost 80% time, it works great And I like it. The other 20% of the time, the query that L2S creates gives the correct data, but when actually running with the code, it does not return anything I'm about to pull out my hair. I hope that someone has a problem Can see or hear about it before. Google Search is not returning anything.

Here is the Linux query ...

  var query = from DataLayerGlobals.GetInstance () in E. Db.MILLERTIMECARDs where e.deleted_by == -1 & amp; Amp; E.LNAME == Last Name & amp; Amp; E.FNAME == First Name & amp; Amp; E.TIMECARDDATE == startDate.ToString ("MM / dd / yyyy") Group E by E.L.M. Select new employee in {contract horse = g. SUM (E => EHR concentrate), Millerhaur = G. s. E = & gt; E. HRSHOVEN + E. HRSOder), TravelHairs = G. SUM (E => E. H. R.str.)};  

This is a generated query ....

  SELECT SUM ([t0]. [HRScorrect]) AS [Contractors], SM ([ HRSOH]] [[T.]. [HRSOID]] S [Millarhors], SM ([T.]. [HRstrival] AS [TravelHaurs] FOr [DBO]. [Millertimcard] AS [T] WHERE ([T 0] [[Deleted0] = @ p0) and ([t]]. [Lnd] = @ p1) and ([t]] [fnd] = @ p2) and ([t]]. [ TIMECARDDATE] = @ P3) by group [T0]. [LNAME]  

Now when I plug the exact values, then that is the linq query I am getting the right data when I run the code, I do not get anything.

Any ideas?

< Div class = "post-text" itemprop = "text">

What's the time-card? Date, daytime, datetime2, smalldatetime, datetimeoffset or character?

No chance local date / time settings Are you messing up the comparison date to startDate.ToString (...) ? Since you are sending @ P3 as string , 01 / 02/2009 May 1st Feb Time settings on or January 2, date / server


jQuery calendar not displaying next and previous buttons in IE8 -


I'm using the jQuery calendar. When viewed in IE8, next and previous buttons are not displayed but, when I see the page in IE7, I can see the button.

  $ (function () {$ ('# $ (' # and date ') Datepicker ({showOn:' button ', button image:' /i/CalendarIcon.png ', button Image only: true}); $ ('# end date). 


c# - Help converting generic List<T> to Excel spreadsheet -


I am trying to create a function that is a normal list & lt; T & gt; accepts and rewrites the list returning an excel file byte [] . Function object must be able to determine properties So if I have a list & lt; Person & gt; and I need to keep the assets of the person in the first, the last, the age, etc., then I should be able to determine the property names to create the superior column headers and then I need it column Repeat the list to assign property values ​​to cells. Does anyone give me a list in a normal function & lt; T & gt; Does point to some sample code to work with?

On one side: to get back the column in a known order: there is There is no defined order for members, except for what you create (for example):

The GetProperties method does not return properties in a specific order, such as alphabetical or announcement order. Your code should not depend on the order in which the properties are returned because the order changes.

If you do not have to trust the order, then what will the image or typewriter do? For example (Given that it writes TSV text, byte [] - my interpretation is that the problem is getting data, Excel is not typing):

< Pre> still zero WriteTsv & lt; T & gt; (This IEnumerable & lt; T & gt; data, text recovery output) {PropertyDescriptorCollection props = TypeDescriptor.GetProperties (typeof (t)); Foreign Currency (Property Descriptor Prop Prop) {output.Write (prop.DisplayName); // headers output. Type ("\ t"); } Output.WriteLine (); Foreign Currency (T Items in Data) {foreach (Property Descriptor Prop in Exponent) {output.Write (prop.Converter.ConvertToString (prop.GetValue (item))); Output.Write ("\ t"); } Output.WriteLine (); }}

If you want the requirement command, then you will need it either:

  • Pass it (
  • Use attributes on properties
  • Use the alphabet
P> TypeDescriptor
The advantages of the approach given above are (Gettype). GetProperties () ):

  • This custom object model (< Code> DataView , for example, if you use IList )
  • You can zoom in to implement implementation - for example (useful if you're doing this much)

javascript - how to stop "setInterval" -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 7 जवाब

मैं कैसे रोक और शुरू setInterval ?

मान लें कि मेरे पास एक textarea है। मैं फोकस पर setInterval को बंद करना चाहता हूं और ब्लर पर (jquery के साथ) setInterval को पुनरारंभ करना चाहता हूं।

आपको इसे शुरू करने के दौरान अंतराल के टाइमर आईडी को संग्रहीत करना होगा, फ़ंक्शन का उपयोग करके आप इसे बंद करने के लिए बाद में इस मान का उपयोग करेंगे:

  $ (function () {var timerId = 0; $ ('textarea') फ़ोकस (फ़ंक्शन () {timerId = setInterval (function () {// अंतराल समारोह शरीर}, 1000);}) ; $ ('टेक्स्टरेआ')। धुंधला (कार्य () {स्पष्ट अंतराल (टाइमरआईडी);});});  

How does a URL qualify to be called a CDN -


I would like to create my own content distribution network and it has been shown to me in a blog post, one of which How to do Google's services but I can not understand it Here are some more questions.

What is considered as "CDN" in Flickr?

If I am creating a subdomain within my domain, then enter the file's directories there, and link to that subdomain from my site, it is considered a CDN? From

:

A content delivery network or content delivery network ( CDN) is a system of computers in which copies of data are placed at different points in the network so that the bandwidth can be maximized for access to data from customers across the network. A client reaches a copy of the data near the customer, as opposed to reaching the same central server to all customers, so that the server is interrupted.

I think that once you repeat the content, in some computers around the world, any URL should be OK.


iis - Virtual directory deleted when publishing asp.net application? -


A small question I have is running a website: 80 I will create a virtual directory "itemimage" under that site whose context E: \ iGadgets Items

When I publish ASP.NET on the website here: 80 "Delete all existing files before publishing virtual" directory "item image" is also deleted.

Any way to stop doing so? Or better: if there is any way to define the virtual directory inside the asp.net application, will I be made in any "fresh" publication?

Thanks in advance!

Against the website, try publishing the website in the directory? To wit. Publish for C: Contrary to the \ Websites \ Web site (or whatever path it is),

Or you can try to use "Replacement files" instead of removing all pre-existing files Are you


java - JSF: h:datatable problem -


I have a problem with H: I do not know the data lab tag in JSF, why my statistics are not being displayed on my page . Some advice?

This is my code:

  & lt; H: DataTable Rows = "2" var = "deb" value = "# {debCredTab.rows}" & gt; & Lt; H: column & gt; & Lt; F: Aspect Name = "Header" & gt; Debit & lt; / F: Aspect & gt; & Lt; H: Input Text = "# {deb.debet}" /> & Lt; / H: column & gt; & Lt; H: column & gt; & Lt; F: Aspect Name = "Header" & gt; Credit & lt; / F: Aspect & gt; & Lt; H: Input Text = "# {deb.credit}" /> & Lt; / H: column & gt; & Lt; H: column & gt; & Lt; F: Aspect Name = "Header" & gt; DebcredSum & lt; / F: Aspect & gt; & Lt; H: Input Text = "# {deb.debetCreditSum}" /> & Lt; / H: column & gt; & Lt; / H: datatable & gt;  

And here's my output:

  & lt; Table rule = "all" & gt; & Lt; Tbody & gt; & Lt; / Tbody & gt; & Lt; / Table & gt;  

The question is: why? I forgot something? Why is not my table showing on the page?

I will test to make sure that your rows are not returning blank:

< Pre> & lt; H: output text value = "# {debCredTab.rows eq null}" />

Then I'll see if the number of rows is zero.


.net - How structure whole applications in Visual Studio? -


उदाहरण

मैं परियोजना पर काम करता हूं, जिसमें 3 अलग हिस्सों ASP.NET MVC, WinForms, Silverlight) और 15 परियोजना (सामान्य, एपीआई, सेवा, रिपॉजिटरी और WinForm के सीएबी)।

संकल्प

1) सभी एक समाधान में यह प्रोजेक्ट 2) प्रत्येक भाग के लिए समाधान है

दृश्य स्टूडियो में समाधान और प्रोजेक्ट्स से निपटने का सबसे अच्छा तरीका क्या है?

सबसे पहले अगर मैं रिफैक्टरिंग करता हूं तो महान है।
बेहतर स्पष्टता के लिए दूसरा अच्छा है।

मैं करता हूँ दोनों। आप एकाधिक समाधानों के लिए एक प्रोजेक्ट जोड़ सकते हैं।


sql - Selecting group using Unknown column value -


मेरे पास रिकॉर्ड (आईडी, नाम, कक्षा) जैसी बड़ी तालिका है

I

लेकिन ऑपरेशन करने में सक्षम होना चाहता हूँ

लेकिन मैं नहीं जानता कि क्लास के लिए सभी संभावित मूल्य क्या हैं

वर्तमान में मुझे करना है 2 प्रश्न: प्रश्न 1: परिणाम = myTable से विशिष्ट वर्ग चुनें;

प्रश्न 2: परिणाम से प्रत्येक मान के लिए,
classWiseRows = myTable से चुनें * जहां वर्ग = मान ;

तब मैं कर रहा हूँ

Q1.result में प्रत्येक मान के लिए {
classRows = Q2 जहां क्लास = मान;
दोओपरेशन (क्लासरार);
}

मैं इन दो प्रश्नों को एक में संयोजित करने में सक्षम होना चाहता हूँ .. डीबी के 2 दौरे से बचने के लिए।

im ADO.net, .net 2.0 का उपयोग कर।

पूरे परिणाम को अपनी पहली क्वेरी से डेटासेट में प्राप्त करें

  अलग वर्ग का चयन करें MyTable से;  

और फिर आप अपने रिकॉर्ड को डेटाैट का उपयोग करके फ़िल्टर कर सकते हैं।

इसके अलावा आप

का उपयोग करके अपना कार्य पूरा कर सकते हैं एक उच्च संस्करण का इस्तेमाल किया है 3.5+ कहते हैं, मैंने इसकी सिफारिश की होगी

आशा है कि यह मदद करता है


Example of Where cluase query including the MSACCESS database connection in C# -


Similar to the title. An example of just Oleb connections where the clause is from the query.

  private function SendQueryToOLE () As DataSet Dim rdrDataReader as OleDb.OleDbDataReader Dim cmdCommand as OleDb.OleDbCommand dim as dtsData as new DataTable dim as new DataSet dim dtbTable I OleDb.OleDbConnection as String dim oleConnection as integer dim SQLStatement oleConnection.ConnectionString = YourConnectionString SQLStatement = "SELECT * fROM table WHERE field = 1 "oleConnection.Open () cmdCommand = New OleDb.OleDbCommand (SQLStatement, moleConnection) rdrDataReader = to cmdCommand.ExecuteReader () to I = 0 (rdrDataReader.FieldCount - 1) dtbTable.Column.Add (RdrDataReader.GetName (i), RdrDataReader.GetFieldTyp e (i)) next DtbTablekBeginLoadData () Dim value (rdrDataReader.FieldCount - 1) as the object when rdrDataReader.Read Ardeeditaiderkget value (value) Ditibitiblkloddetaaro (value, true) and Ditibitibl. Endloadedata () DTS Data Tabs ADD (DTbTable) Molecognition Closed () Returns Dts Data and Function  

spring - Lingering Hibernate sessions without transaction in JBoss -


I had to face the hibernate problem, I just can not find my way. JBossWS 2.0.1 To get the version) Hibernate 3.2.6 running in a Spring 2.5.4 application at Jebus 4.2.0.

Normally it works just fine, but for some time the system enters a state of healthy (i.e. presently we do not know for some reason), where some request for the first time in the hibernate call "org .hibernate.HibernateException: The current transaction is not in progress "with fails. This server affects random requests until the restart. I am unable to reproduce it and am currently "reacting" when it happens (so far only in the testing environment.

I hit the JBS transaction deadline and the server code The income has triggered the same behavior with the hibernate call, but without any coordination of Arjun, it logs the cancellation of the action, and it does not appear again on subsequent calls.

O my head But I am suspecting that a thread "state" is somehow maintained with a preceding call and when that thread is used again for another request, then no transaction is started. There is a knowledge of working in hibernation, not more, but transactions and sessions work otherwise, which is why I have come here

Can you give me an indication of the investigation and / or the configuration?

It was actually a bug in a hibernation that left the session behind under some conditions! Upgradation 3.3 in Hibernation resolved this issue.


jquery - jrails loading remote_form_tag rails -


I recently switched to jQuery using jRails for an app. All my work is 99% at the last Arjes, only except: loading => callback when using Dursth_form_tag

  & lt;% form_remote_tag: url = & gt; '/ Hostel / update_concease',: loading = & gt; Visual_effect (: appears,: load_currency),: html = & gt; {: Id = & gt; 'Currency'} =%>  

I have the hidden DIV # load_currency which provided went working prototype before using assistants perfect

But By using the new gel option, this feature does not seem to work?

I tried to use RJS and jQuery directly:

 : loading = & gt; Visual_effect (: appears ,: load_currency): loading = & gt; "$ ('# Load_currency') Show ();"  

What is this product in HTML:

  onsubmit = "jQuery.ajax ({beforeSend: function (request) {jQuery (& quot; # Load_currency & amp; quot;). FadeIn ();}, data: jQuery. ultimate (jQuery (this) .serializeArray ()) + '& amp; amp; Pramanikta_tokn =' + Ancodurik component ( 'O7Y7wzFoPPxGSTxIb2bQ3zshrUP + h1OGAUdtyzdQz0A =') , Data type: script ', type:' post ', url:' / hostels / update_currency '}); return; "& gt;  

I also tried callback: instead of: and: instead of loading: nothing else ... any thoughts? Or does this feature not only work with Jerells?

Thank you

I think the cleaner to avoid inline JavaScript and plain old You can try jquery to do something like this:

  # view.html ARB & lt;% form_tag '/ hostels / update_currency' ,: html = & gt; {: Id = & gt; 'Currency'} =%> ... # some_included_javascript_file.js $ (function () {$ ( '# currency'). Submit (function () {$ ( '# Load_currency'). Show (); // or effects $ .post (it .action, jQuery.param () () () () () (), function () {$ ('# load_currency'). Hide (); // or an effect}, 'script');} );});  

.net - C# Sort and OrderBy comparison -


I can sort a list through sort or orderby which is fast? Are both working on the same algorithm?

  list & lt; Person & gt; Person = new list & lt; Person & gt; (); person. Add (New Person ("P005", "Johnson")); person. Add (New Person ("P 002", "Arvind")); person. Add (New Person ("P007", "Cashel"));  

1.

  individuals.Sort ((p1, p2) => string .compair (p1.Name, p2.Name, true));  

2.

  var query = persons.OrderBy (n = & gt; n.Name, new NameComparer ()); Class name compairer: iCompair & lt; String & gt; {Public int comparison (string x, string y) {return string Computer (x, y, true); }}  

Why not measure it:

  Classroom program {class NameComparer: IComparer & lt; String & gt; {Public int comparison (string x, string y) {return string Computer (x, y, true); }} Class person {public person (string id, string name) {id = id; Name = name; } Public string id {get; Set; } Public string name {get; Set; }} Fixed Zero Main () {List & lt; Person & gt; Person = new list & lt; Person & gt; (); person. Add (New Person ("P005", "Johnson")); person. Add (New Person ("P 002", "Arvind")); person. Add (New Person ("P007", "Cashel")); Sort (person); OrderBy (person); Const int COUNT = 1000000; Stopwatch clock = stopwatch Startup (); For (int i = 0; i  

This program prints on my computer when it is released in release mode:

  Sort: 1162 Order-Order: 1269ms  

Update:

As suggested by @tefan, this is the result of a short list sorting:

  list & lt; Person & gt; Person = new list & lt; Person & gt; (); {Individuals.Add (new person ("P" + i.ToString (), "Jason" + i.ToString ()) for (Int i = 0; I & lt; 100000; i ++); } Sort (Individuals); OrderBy (person); Const int COUNT = 30; Stopwatch clock = stopwatch Startup (); For (int i = 0; i  

Print:

  Sort: 8965ms Order-B: 8460ms  

In this scenario it seems that OrderBy performs better


UPDATE2:

and using random names:

  list & lt; Person & gt; Person = new list & lt; Person & gt; (); {Individuals.Add (new person ("P" + i.ToString (), random string (5, true)) for (Int i = 0; I & lt; 100000; i ++); }  

Where:

  Private static random randomSeed = new Random (); Public stable string ramstring (integer shape, bold lower case) {var sb = new stringbilder (size); Int start = (lowerCase)? 97: 65; For (int i = 0; i  

Yield:

  Sort: 8968 Order order: 8728ms  

Still order b is fast < / P>


c# - Calling Dispose() vs when an object goes out scope/method finishes -


I have a method in which an attempt / hold / block is inside the block, within the block, I declare the SqlDataReader as follows I do:

  SqlDataReader aReader = null; AReader = aCommand.ExecuteReader ();  

In the end, the objects are manually resolved which are set at those square levels. So in the method objects that implement IDisposable, such as SqlDataReader above, do they automatically settle? Closed () is called on a reader (to be settled), as close ()) after the loop is executed for a while to get the contents of the reader. If there is no call to stop, will this object be automatically stopped / disposed when the method is over or the object will be out of the scope?

Edit: I am using the () statement, there are scenarios which are confusing me thanks

thanks

No, objects are not automatically removed when they go outside the scope.

If they collect garbage they also do not guarantee to be disposed of, although many IDisposable objects make sure to help implement a "fallback" final That they are

You are sure that any IDisposable objects are wrapped in a block. >

.net - Help with system.stackoverflowexception -


Suddenly my app is pointing it to the App Event Viewer:

EventType clr20r3, p1w3wp. Exe, p2 6.0.3790.3959, p345d 6968a, p4 apcode.huircm, p5 0.0.0.0, p6 4b167253, p730, p8 0, p9 system. Stokhwarfloxtestation, P10 NIL.

Nothing has changed since yesterday, and everything worked fine before. Server is running some .NET 2.0 webservices at the top of Windows Server 2003. !!!!!

Edit:

In addition, I'm running it on two servers of 2008R2 and 2003, the exact same code, 2008R2 worked fine on it Does, but this application blocks the pool on 2003. This usually indicates a runaway recurring call (purpose or not)

It is difficult to tell without seeing some code.


c++ - What is the correct way to initialize a Matrix in C++98? -


  1. I'm not a programmer
  2. I want to compile the inkscape in Win32, and stumble These error messages:

ui / dialog / file_dialogimpl-win32.cpp: 1379: Error: 'Matrix' should be started by constructor in C ++ 98, not To create '{...}' [1]: *** [ui / dialog / fileialogimpl-win32.o] Error 1

Suspicious code filedialogimpl-win32 Cpp :

 ... // Draw the image if (_preview_bitmap_image) // Is the image a pixbuf? {// set the conversion matrix matrix = {scale factor, 0, 0, scale factor, SVGX, SVGY}; Context-> set_matrix (matrix); ... 

How is it written in the C ++ 98 standard?

I have googling it but no one has faced it like this, can it be unrelated?

const matrix metrics = {scaleFactor, 0, 0, scaleFactor,

Something like this should be:

const matrix metrics (scale factor, 0, 0, scale factor, svgx, svgv);


c++ - A good example for boost::algorithm::join -


I just wanted to use but I could not find any usage examples and I did not want to invest in a lot of time To use this function to learn the Boost Range Library,

Can you provide a good example for using a string to be included in the container? Thank you.

  #include < Boost / algorithm / string / join.hpp & gt; #include & lt; Vector & gt; # Include & lt; Iostream & gt; Int main () {std :: vector & lt; Std :: string & gt; List; List.push_back ("hello"); List.push_back ("world!"); Std :: string join = boost :: algorithm :: join (list, ","); Std :: cout & lt; & Lt; & Lt; & Lt; Std :: endl; }  

Output:

  Hello, world!  

python - How to install cpplint on windows? -


I'm trying to work on cpplint on Sublime Text 3 and I use seepcake and cpplint to install the sublayer I have downloaded and now I am trying to follow these instructions

I have installed Python and I think that I was installed POP using the command prompt, told me It was that PIP was up till now but B. I say

  [sudo] pip install cpplint  

I'm lost.

I already on my way and my understanding, Sudo is a Linux command which is equal to runs in the window. I tried to run several different ways including typing the full path of cpplint, can anyone help me?

PP usually resides in C: \ Python 2x \ scripts . You have to add it in your own way too. So you should be able to call the pip calls from the command line. Just try opening cmd.exe and type PP and then enter. It should print a bunch of useful information about PIP if it gives you an unfamiliar command, then perhaps you can add it incorrectly in the path.

You can also run PIP like this:

  c: \ Python27 \ pip .exe install some package  

if If you are running cmd.exe as an admin user, then it should work fine. When I downloaded a package that I want to install with PIP, I usually open cmd.exe and then change the directory in place of the file. So on your command line, you will do something like this:

  cd c: \ path \ to \ cpplint  

Now that you have the right place in that folder You can run dir to get a list of what's in it. Sometimes when you open a package, it's a good proxy investigation, you have a subfolder to navigate to reaching the setup.py script. If you see setup.py go up one level and do the following:

  c: \ Python27 \ scripts \ pip.exe install -e directoryName  
< P> See

Alternatively, you can go to the folder with setup.py and you can completely skip completely:

  Python Finally, you can also use PIP to install from a zip download:  
  pip install c: \ path \ to \ zipped \ package  

See also:


mysql - Recursion limit exceeded in non-recusrive procedure -


I have a process that says second process, they do not call each other back or call themselves, but I am getting an answer to an error which shows that they are. Processes are as follows:

  build process permissions (perm VARCHAR (30), target VARCHAR (30), ID VARCHAR (8), host VARCHAR (45), passwd VARCHAR (45)) BEGIN SET @setPermissionCmd = CONCAT ('grant', perm, 'ON', target, '' '', id, '' '' ', host,' '' identified '', passwd, '' ''; '); Set display @setPermissionCmd from STMT; EXECUTE set display STMt; Set DEALLOCATE PERMissionStmt; Flush Pvt .; END  

and

  building process grant (ID VARCHAR (8), host VARCHAR (45), passwd VARCHAR (45) BEGIN call grant (' EXECUTE ',' User creation process', ID, host, password); Call grant ('executed', 'process grant admin', id, host, password); Call grant ('executed', 'canceling process' admin, id, host, password); Call Approval ('INSERT, UPDATE', 'TaskType', id, host, passwd); Call grant ('update', 'user', id, host, password); User SET isAdmin = 1 where url dbUser = update ID; Flush Pvt .; END  

When I call the second process, I get the following response:

  Maria DB [Petsby]> gt; Call grantAdmin ('patts', '%', 'patts'); Error 1456 (HY000): Recurring limit 0 (determined by maximum_sp_recursion_depth variable) exceeded for regular grantAdamman  

Why is it that my process is recurring? Just because the name is described in the definition?

Add to the beginning of this SP: SET max_sp_recursion_depth = 255;


c - Assignment from incompatible pointer type when using Linked Lists -


I am trying to use a simple linked list example, the origin behind the use of them for later use In an effort to understand the idea However, I have been confused about how to determine each node in the list. I am here, I want to set "A" member of member "B" at "B" member and C address. However, this is where the warning occurs,

  #include  Data = 0; A-> gt; Next = null; Structure list * b = malloc (size (structure list)); B-> Data = 1; B-> Next = null; Structure List * c = malloc (sizeof (Structure List)); C-> Data = 2; C- & gt; Next = null; A-> gt; Next = & amp; Nbsp; // The alert goes here- b-> Next = & amp; C; }  

Is there any way to set the value of next (a.next) and b-> next (b.next) without any warning?

a-> next type is struct list * < / Code>.

b is of type struct list * .

& amp; B type structure list ** .

You probably wanted to: a-> next = b;


asp.net - page refresh detection code not working -


I found a good article about finding page refresh in this article: I tried to follow the code Vb A web form application written in .net

My problem is that when I refresh the page using the browser refresh button, the Boolean IPhone refresh always remains false. So, the code I'm trying to stop from executing on page refresh keeps me going.

Here's an example, if my vb.net code contains the code changed from the article:

  is slow as Boolean = IsPageRefresh = false protected sub account_set_load (sender EventArgs as an object, handle the Meal.Orport IfPostBack if not seeState ("ViewStateId") = System.Guid.NewGuid () session ("session ID") = ViewState ("ViewStateId"). ToString () Otherwise see "Stats" viewstate). ToString () & lt; & Gt; Session ("Session"). Toasting () Then IsPageRefresh = True End if the session ("session ID") = System.Guid.NewGuid (). ToString () ViewState ("ViewStateId") = Session ("session ID"). ) End if the last sub-protected sub account_set_load complete (sub-sender as the object, e-mail as the system). Then, if not (customer (sign (request ("key")) then add customer message ("invalid password reset key", messaging error.), Form authentication, signature () functions. Redirect (SiteLink.ResetPassword) Other ' If there is no end, the work Redirect (SiteLink.ResetPassword) has expired or 'End nothing if the end is ending sub  

I ask this to help I would like to ask that I Where is the mistake or better way?

I have seen many articles that show how to capture page refresh in code, but they use the prerenders method, and that solution

I hope I can get some positive feedback.

Many thanks.


javascript - HTML5 drag and drop image offset on drop -


I have a draggable = "true" element that I'm leaving in a drop zone The incident returns me some properties which I can use to use it and make a new element where it was dropped.

It seems to give only the position of the mouse. But it does not seem where the image was offset with respect to the mouse.

Where will I find that information?

image offset example

Help in understanding To do a picture, the mouse is at the yellow point. Drop Event Returns event.x and event.y where the mouse is .... but I should know what the blue dot is, or offset (red lines)


linux - Python: File Reader int and if clauses -


I need some help with Python - I am reading a file with its values ​​in each row. At the moment my code is activated when int (float (rstrstrip ()) == 7. But I want to add additional that 7 should not run any other in each row in the file.

Any thoughts?

Thank you!

Sorry for my english

  import os file = open ("/ home / pi / desktop / autozobes / netidapa" for line in file "," R "): if int (float (line .strustrip) ) == 7: OSSystem ('Sudo Python / Home / PI / Desktop / Auto Jobs / TvOn.py') file.close ()  

/ home / pi / Desktop / AutoJobs / Netdata.py:

  1 2 3 4 5 6 7 (The network is the last part of my device (1902.18.1.x) and I want to turn off the device .7 Not connected - the file updates netdata.py every minute and can happen For example the device .7 is not connected and the number is not listed in the file 7)   

  Import OS found = wrong file = open ("/ home / pi / desktop / autojobs / netdata.py", "R") for the line in the file: if int (float (line .striste)) == 7 : Found = True OSSystem ('Sudo Python / Home / PI / Desktop / Autozobus / T VON' File.close () if not found: Print "Add your code here."  

python - What is the best way to add to the dimensions of a 3d numpy array? -


I have a NumPy array that is shaped: (54,41,2) How do I change it efficiently ( 57, 41.2) Is it that the three dimensions in the 57 dimension are zero for their values?

I did this, but I'm not sure this is correct:

  final_data = np.zeros ((57, 41, 2)) last_data [: small_data.shape [0]] = small_data    

np.concatenate one Good candidate It is clear and it was designed to do this.

Example:

  & gt; & Gt; & Gt; Np & gt; & Gt; & Gt; A = np.arange (3 ** 3). Recipe (3,3,3) & gt; & Gt; & Gt; B = np.zeros ((2,3,3))> gt; & Gt; & Gt; Np.concatenate ((a, b), axis = 0) array ([[[0., 1., 2], [3., 4, 5.], [6., 7., 8.]], [[9, 10, 11], [12., 13., 14.], [15., 16., 17.]], [[18., 19., 20.], [21., 22., 23.], [24., 25., 26.]], [[0., 0., 0.], [0., 0., 0.], [0., 0, 0 ]], [[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]])  

You have to keep in mind that in oval, arrays are usually stored in a stored fashion. This is the reason that adding an array (in any axis) will result in an new array, because the array needs a new memory location.

Note: In this case, although I am limited to 2D arrays, using vstack is more logical I < The comparison of / p>

np.concatenate is in your original view in which you first define an array of array and then overwrite a portion of the array, it includes the arrays in it Depending on the size, speed gain is small in any case:

 in  [14]: a = np.random.ra [15]:% timeit original_way (a) 100 loops, best 3: 3.77 ms per loop [16]:% timeit concat_way (A) 100 loop, best 3: 2.93 ms per loop [17]: 2.93 / 3.77 out [17]: 0.7771883289124669 in [18]: one = Np.random.random ([1000,100,150]) [19]:% timeit original_e (A) 10 loops, best 3 : 64.6 ms per loop [20]:% timeit concat_way (A) 10 loops, best 3: 64.8 ms per loop  

If this is an obstacle in one of your applications, -Disclaimer will search for solutions.


networking - How to discover other devices on a network programmatically? -


Imagine that you are developing a multiplayer game and want to host a game. In other players of the same local network, open games can be discovered and included.

How can this programmatically be achieved?

Here's what I have considered: 1) Scan local IP address and port (not possible with IPv6) 2) Provide IP-ad host and give input to users (Consumers' Not good for)

How is such a task done in general? Is it where the multicastes come in play? I am looking for a solution that can work for both IPv6 and IPv4. Port scanning is not just good.

Thanks in advance.

For one IPv4 after one, you can send a broadcast message to the broadcast address

2) For IPv6, you can send a multicast message.

Router does not have to block UDP packets.


Refresh with parameters in the Kendo UI Grid with AngularJS -


I am trying to use the Condo UI Grid with AngularJS, where I define the grid like this:

  & lt; Div id = "grid" kendo-grid = "grid" k-options = "grid options" />  

I then set the option in the controller, such as:

  $ scope.gridOptions = {height: 543, scroll: {virtual: true}, Data: 'Jason', Data type: 'Jason', ServerPaging: True, ServerSurring: True, Pages: 100, Transport: {read: {url: '/ C99_JsonService / F20_GetTrattativePerRicercaConFiltro', Data type: 'ID: 9, stato: $ scope. Statomacchina, Ascitto: $ scope. Acetotretative}}}, schema: {data: function (results) {return results. Data || Result;}, total: work (result) {return result: results Length || 0;}}}};  

As you can see, I have some other custom parameters to use in the request, and they are connected to the angular variable.
First go to the well loaded things and get me the right data.
Then, I added a button to the user to refresh the grid with new values ​​edited in the UI, connected to 'acetotratativa' A 'statomaacquina'. The following function has been tied to the button:

  $ scope.esegui = function () {$ scope.grid.dataSource.read (); $ Scope.grid.refresh (); };  

When I click on the button (executes the function 'esegui'), the request is sent back to the server, but with the original values ​​in the variable, even if I think Has changed to the real value parameters: It seems that there are some customizations that use cached values ​​... or am I missing anything important?
Thanks for all.
Andrea

It is possible to send parameters when you read it

  

Node.js - Mongoose - How should I assign multiple Many-to-One relationships in this case? -


In this case, I need to assign a number of relationships, because you can see below:

Treasures: {East: var portfolio_suchi = new schema ({instability: number, bond: {percentage: {type: number, default: 0.6}, USA: (percent: {number: default, 0.7} {Percent: percent: {type: number, default: 0.4}, securities: [{type: object, ref: 'security'}}}, municipality: {percentage: {type: number, d Default: 0.2}, Securities: [{Object ID, Ref: 'Security'}}}, Corporate: {Percentage: {Type: Number, Default: 0.4}, Securities: [[Type: Ob EctId, Ref: 'Security' } {}: {Percent: {type: number, default: 0.3}, developed: {percentage: {type: number, default: 0.7}, securities: [{object: securities: [{type: object} , Referee: 'safety'}}}}, stock: {percent: {type: security}}}}, emerges: {percentage: {type: number, Default: 0.4}, United States of America: {percentage: {type: number, default: 0.7}, large cap: {percentage: {type: number, default: 0.4}, securities: [{type : {Percentage: {type: number, default: 0.4}, securities: [{object: referee: 'security'}}}, smallcaps: {percent: object, referee: 'security'}]}, middle cap: {percent: {Type: number, default: 0.2}, securities: [[percent: {type: number, default: 0.7} Securities: [{Type: object, ref: 'security'}}}}, international: {percent: {type: number, default: 0.3} securities: [{object: referee: 'security'}]}} }}, _goal: {type: 'security'}}}, excerpted: {percentage: {percentage: number, default: 0.3} object id, ref: 'round'}}); Var ProtectionSmain = New schema ({name: {type: date, required: true}, average rating: number, average number: number, percentage: number});

However, I think it's just using array instead of [[context: ObjectId, ref: '']) Will be easy in Security '}] .

I'm not sure what I should do. Anyone would know this in a proper way? Thanks!

If you only have your security objects, you [[type : ObjectId, ref: 'security'}] .

should be used.

c# - How to bind WCF methods to arbitrary URIs -


I use WCF (through the use of WebChannelFactory) to implement certain services that Outside the WCF perspective of technologies, there is only one method in my interface, let's call it "out-stuff", therefore, the same method can be used by these services, or like, or

in all instances, WebGet / WebWeb for binding method for URI Uaraitimplet is accomplished through the member. Specialty. But this means, all URIs in the "get-stuff" method should follow a specific template. For example, I can create UriTemplate = "/ get-stuff" so that my method is always bound to / get-stuff.

However, I want my method to be any arbitrary URI. BTW, the parameters are passed as a postal data, so I do not have to worry about complying with URI for the parameters of the method.

Why do not you do something like this

  endpointAndres endpoint address = New Endpoint Address ("Any service URL"); ChannelFactory & LT; IMyService & gt; ChannelFactory = New Channel Factor & lt; IMyService & gt; (Binding, endpoint address); IMyServiceclient = channelFactory.CreateChannel (); Client.getStuff ();  

how can i return 404 http status from dropwizard -


New drop-wizard! Anyway, can I return a different HTTP status code from the API? Originally something like this!

  @GET @Timed Public MyObject getMyObject (@QueryParam ("id") optional; & lt; string & gt; {MyObj myObj = myDao.getMyObject (id) if (myObj = = Null) {/ Return Status NOT_FOUND; // or something similar // or more probably // getResponseObjectFrom somewhere. Satstats (mystatus)} myObj; }  

I use the JX-RS Response object instead of returning my actual domain In response, the object acts as an excellent standard for incorporating metadata with your feedback object and provides a good manufacturer for managing status codes, headers, customer content types, etc.

  // import javax.ws.rs core. @ GET @ Reply above responded public response getMyObject (@QueryParam ("id") optional;; string> id) {MyObject myObj = myDao.getMyObject (ID) if (myObj == tap) Or other metadata if this useful return is Response.status (Response.Status.NOT_FOUND) .build ()} Return Response.ok (myObj) .build (); }  

format - java, print in bold -


How do I print output in bold in printf? "[1m bold test" does nothing.

  string format = "% -20s% -15s% -20s% -15s% -10s"; System.out.printf (format, "name", "group_name", "javascript_level", "cpnnr", "gender", "[1m trial bold");  

You do not print bold with java System.out Can do It only streams on the standard output stream, so in principle, it is only unchanged text

However, some software describes specific character sequences (the so-called ANSI escape sequence) to allow format formatting. is.

Note that the ANSI escape sequence starts with an escape character, so you have to add it to your string as well. ( "\ u001b [1m I am bold" ].

Most UNIX terminals interpret the ANSI escape sequence by default. In Old DOS time, you work To do escape sequences, it is necessary to use ANSI.SYS .

Codes do not work in Windows and Eclipse terminals.

< / Html>

Center a DIV to a nother using jQuery css -


If there is more than one nested DIV, then how do I set them to DIV at the center of another div at once.

Example: I want to change the value from $ ('# thiWrapper) to $ (' # moving ')

  $ ('# Moving DIV'). CSS ({left: $ ('# on). Wide () / 2 - $ (' # moving DIV '). Width () / 2 / doesNot work});  

html:

  & lt; Div id = "thiWrapper" & gt; & Lt; Div id = "moving wall" & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

css

  #moveingDiv {status: relative; } 

If the set width of the original element (i.e. #thiWrapper) is a good

  

CSS:

  #th wider on {width: 200px; Height: 200px; Background color: blue; } # Flyer dive {width: 100px; Height: 100px; Background color: red; Margins: Auto; }  

If you are set dead on implementing this program, the best way to do this is by creating a class with CSS properties that you add and add that element to the jQuery addClass () method By using. For example, you change the CSS in the example given below with CSS.

  #thiwerapper {width: 200px; Height: 200px; Background color: blue; } # Flyer dive {width: 100px; Height: 100px; Background color: red; }. Center {margin: auto; }  

You can then #moveingDiv Programmatic Center with the code below:

  $ ("# movinging"). AddClass (". Center");  

and the United Nations Center with the program:

  $ ("# movinging"). RemoveClass ("center");  

c++ - GCC Source Code modifications in libstdc++-v3 not being shown -


I am new to GCC source code. I make some simple modifications in libstdc ++ - v3 I am starting to do because I need major modifications for the project which I am working on.

I have downloaded the GCC 4.8.5 source code and function to call the __ cxxabiv1 :: __ cxa_allocate_exception function just to know that the function was called. To test it, I did build-4 and later install with this built version of GCC, I compiled a simple program that throws an exception However, no print is shown.

Then I tried to increase a global variable, which was declared in the same event as I was trying to compile the program. Using GDB, I realized that the global variable was in the area but it never grew. Finally, I tried to write a message to a file but the file was never created.

I'm sure the function is being called. But I'm not sure why he is not doing what it should be. If I put something wrong in the code, then it will not compile, but when it makes modification it is not reflected in the behavior of the program.

I have to know whether I am doing something wrong in doing a little test. With amendments, I am starting to cooperate with GCC source code or where I can read.

Adjust LD_LIBRARY_PATH to point to your GCC / Lib directory Otherwise, your binary will use your system libstdc ++ .

An alternative method would be -static-libstdc ++ .


ssl - Is there a way to use FtpWebRequest to authenticate to FTP using client certificates in C#? -


I am trying to upload a file to an FTP server and allow me to authenticate user certificates with the username and No password should be

  var fullFtpPath = String.Concat (ftpItem.FtpAddress, "/", record, ".txt"); FtpWebRequest request = (FtpWebRequest) WebRequest.Create (fullFtpPath); request. Credential = New network credentials (ftpItem.Username, ftpItem.Password); request. Method = WebRequestMethods.Ftp.UploadFile; Request.UseBinary = true; Request.UsePassive = ftpItem.UsePassive; Request.EnableSsl = ftpItem.UseSSL; Request.ContentLength = bytes.Length; (Stream s = request.GetRequestStream ()) using {s.Write (byte, 0, bytes lang); } FtpWebResponse response = (FtpWebResponse) request.GetResponse (); Debug.lightline ("upload file complete, status {0}", response status description); Db.LogExport (siteId, fullFtpPath, record, truth, feedback status description); Response.Close ();  

Above is my current code, but I'm not sure how to implement certification certification or if this is possible. Do I have to make a certificate? Or will the server provide me a certificate and will I set it up in my request?

  • Use certification to specify the certificate to use
  • You create either a certificate of your own (import from a byte array or file), or see it above, a certificate archive ()
< Pre> FtpWebRequest request = (FtpWebRequest) WebRequest.Create ("ftp://ftp.example.com"); request. Credential = new network credentials ("user name", ""); // Query certificate from X509 Store Store = New X509 Store (store name. Mine, store location, current user); Store.Open (OpenFlags.ReadOnly); Const string tp = "2b6f8ac51a85cbaf429474a55304313968667611"; X509Certificate2 cert2 = store.Certificates.Find (X509FindType.FindByThumbprint, TP, True) [0]; Store.Close (); // Add a certificate to the request request. Client Certificate Add (Proof 2);

jquery - Adjusting page elements position layout using twitter bootstrap specific to mobile devices -


I am creating a search box that looks on a desktop browser:

Enter image details here

And it currently looks like on a mobile browser:

Enter image details here

The UI elements given in the question The code looks like the following:

  & lt; Div role = "tabpanel" class = "tab-panel active" id = "adult" & gt; & Lt; H4 & gt; Adult Tickets & lt; / H4 & gt; & Lt; Form class = "navbar-form" role = "search" action = "/ search" method = "go" & gt; & Lt; Div class = "input-group" & gt; & Lt; Input type = "text" class = "form-control" placeholder = "search for an event" name = "q" id = "q" & gt; & Lt; Div class = "input-group-btn" & gt; & Lt; Div class = "btn-group" role = "group" & gt; & Lt; Button type = "button" class = "btn btn-default dropdown-toggle form-control" data-toggle = "dropdown" aria-expanded = "false" & gt; & Lt; Span data-bind = "label" & gt; All adult categories & lt; / Span & gt; & Lt; Input type = "hidden" name = "category" id = "category" value = "all adult categories" & gt; & Lt; Span class = "carat" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; Ul class = "dropdown menu menu-scroll" role = "menu" & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; All adult categories & lt; / A & gt; & Lt; / Li & gt; & Lt;% @ Adult Categories.Each | Category | & Gt%; & Lt; Li & gt; & Lt; A href = "#" & gt; & Lt;% = Category name% & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt;% end% & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; Button class = "btn btn-default" type = "submit" & gt; & Lt; I class = "fa-search" & gt; & Lt; / I & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; / Div & gt;  

I need to clear the mobile browser view. I think it would be best to search that the text box was on its line - and consumed its line on mobile, and then the category dropdown box below search term box With the actual search button on its right

Basically the 3 UI elements, the search text box, the button dropdown, and splitting the search button into two rows, the first line between the first search term and the category dropdown and the search button is divided between them. I do not particularly want to adjust to see the desktop version - so one such method is that I can apply for mobile devices using CSS - or something I want to get this behavior in the Dome Can I change look at this desktop version?

You must isolate your search box and dropdown menu / button by using the bootstrap column Forget the bootstrap, if the elements are not fit on the screen, then it stacks them up a small belle for your code -

  & quot; Div role = "tabpanel" class = "tab-panel active" id = "adult" & gt; & Lt; H4 & gt; Adult Tickets & lt; / H4 & gt; & Lt; Form class = "navbar-form" role = "search" action = "/ search" method = "go" & gt; & Lt; Div class = "input-group line" & gt; & Lt; Div class = "call-sm-5" & gt; & Lt; Input type = "text" class = "form-control" placeholder = "search for an event" name = "q" id = "q" & gt; & Lt; / Div & gt; & Lt; Div class = "col-sm-7" & gt; & Lt; Div class = "input-group-btn" & gt; & Lt; Div class = "btn-group" role = "group" & gt; & Lt; Button type = "button" class = "btn btn-default dropdown-toggle form-control" data-toggle = "dropdown" aria-expanded = "false" & gt; & Lt; Span data-bind = "label" & gt; All adult categories & lt; / Span & gt; & Lt; Input type = "hidden" name = "category" id = "category" value = "all adult categories" & gt; & Lt; Span class = "carat" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; Ul class = "dropdown menu menu-scroll" role = "menu" & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; All adult categories & lt; / A & gt; & Lt; / Li & gt; & Lt;% @ Adult Categories.Each | Category | & Gt%; & Lt; Li & gt; & Lt; A href = "#" & gt; & Lt;% = Category name% & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt;% end% & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; Button class = "btn btn-default" type = "submit" & gt; & Lt; I class = "fa-search" & gt; & Lt; / I & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Form & gt;