Sunday, 15 June 2014

struct - error: ISO C++ forbids declaration of '' with no type -


I got the error: ISO C + + Not included with the illegal declaration 'illegal sig' Header file, how to solve it?

  straight arguments {InvalidSig * context; // error string mname; }; Class invalid {{...}}  

You can declare < Code> square invalid seal above:

  square invalid sig; Struct args {InvalidSig * context; // ...};  

You can also do this, if you want to use the name before its definition:

  struct args {class InvalidSig * context; // ...};  

I recommend avoiding the latter situation, as is more common in the past and anyone reading your code will not be less confused.


c# - How to throttle services with the Castle Windsor WCF Facility? -


The app with WCF is easy to mess up your services on personal services through the app.config or code (behavioral configuration By using this) I can not understand how I can do this in the castle.

In the castle, I know how to impose all my services in this container with the code:

var throttle = new service trafficking () {MaxConvertant call = 2 }; Container Registration (Component & lt; IServiceBehavior & gt; (.). (Throttle));

The problem with this code applies to all services registered in this container.

How can I impose every service on a personal basis in Castle Windsor?

Apply Desecepatches () method is called every time when it If the behavior is wired for service, you can write code inside this event to inspect the service item and apply conditional behavior or not. So it calls this method for every service, but will not do anything for those services that you do not want to implement this behavior.

Less than that, I have not found another way.


In git svn, how can I "unset" noMetadata and useSvmProps -


I am trying to transfer an existing SVN repository to the git.

When I try the following command:

 $ git svn clone svn: //  

I get an error:

  can not be used to set both 'noetetadata' and 'usevmprops' options!  

How can I "unset" one of these options?

Note that I am using SVN version 1.7.3 and Git 1.9.0.

I solved it by updating it in Git 1.9.5 - I think they have decided it Are there.


how to call grails controller from an angularjs function -


I have a grails app and I am trying to use angular for front-end work.

Suppose I have a button on my page, say, 'Add Request' on the click of this button, I call an angular function. But I can not understand how inside the function of this angle, how do I call a 'Grails controller' and method inside the Grails Controller.

  // add data $ scope.addRequest = (Function addRequest () {console.log ('$ scope.request' + $ scope.request); var requestInfo = New string ($ scope .request); requestInfo. $ Save (); $ scope.request = {};});  

There are a few different ways to do this. You can either submit the form, or you can make an Ajax request. I have used both methods, so it depends on how your entire application structure is setup.

AJX

  // Assume that you have different types of elements which $ scope.form = {}; Eg eg & Lt; Input ng-model = "form.something" & gt; Var promise = return $ http.post ("/ controller / action", $ scope.form). Success (work (data) {}) Error (function (data) {});  

form SUBMIT

  jQuery ('# formid'). Submit (); // Just use Jquery to submit the form  

You can also enter a type of INPUT button, submit and include the action in your controller and tag.


php - WordPress ACF absolute crop -


On the front page, I want to display a grid with different images. To make these pictures easier to change, I'm using advanced custom fields. Although it does not actually work to crop these images. I've put the following code in my template file:

   

In my functions.php:

  // thumbnail size add_image_size ('bone-thumb-1040', 1040, 350, true); Add_image_size ('bone-thumb-520', 520, 350, true); Add_image_size ('bone-thumb-260', 260, 350, true); Add_filter ('image_size_names_choose', 'bones_custom_image_sizes'); Function bones_custom_image_sizes ($ size) {return array_ararge ($ size, array ('bone-thumb-1040' => (___ '1040px by 350px'), 'bone-thumb-520' => ('520px By 350px '),' bone-thumb-060 '=> (__ 260px to 263px'),)); }  

My custom field is created in the form of image, with bones-thumb-280 size. You can see the result here:


powershell - How to use a user's input variable as a search query in Get-ADComputer -


Thank you for looking at my first question on this website.

The purpose of this PowerShell script is to query the user for partial name of a pre-existing computer on the domain. After the query is completed, the full computer name receives a specific OU from the specific directory in the Active Directory, and it copies the entire computer's name to the user's clipboard. This is to help save time for those with whom I work in the help desk (including myself) who have to do this verbally manually every day.

Note: I'm pretty sure that there is no problem with two 'go-adcomputer' lines, because if I enter the full computer name manually in the script, then it works at all This issue either looks like how I am defining user input or how it is being passed along with variable ($ PCName) inside the 'Get-ADComputer' cmdlet.

The script here is in its entirety, the only thing I have left is a specific active directory - I know that it is looking at the right direction, because the lines taken personally and manually Names have been entered.

: $ Global: PCName = (Read- Host "Enter Partial PC Name") Write-Host "You've entered a partial PC name: $ PCName" Returns $ PCName #PCName Table of Information Display . Get-ADComputer- SearchBase 'OU = (clutter)' -filter 'name-like' * $ PCName * "'-Properties IPv4Address | Format-Table Name, DNSHostName, IPv4Address -A # Progress Indicator Advisor Message. Write-Output" $ Converting a PCname to a full computer name and copying the result to your clipboard. "#clip line - retrieves the entire PC name and copies the compressed PC's name to the clipboard. Get-ADComputer- SearchBase 'OU = (dislocation) '-filter' name-like '* $ PCName *' '| Name -Ex Type Pump name: $ PCName - Solved and copied to clipboard. "

If there is any other mistake, then I appreciate it. I've been using PowerShell for less than a week and I'm a new programmer. I've demonstrated fewer than 40 Google queries and have spent at least 3 hours so that it can work Could try

New!!

In PowerShell, single and double quotes each have different meanings and significance variables only double The quote will be expanded.

Your query does not work because you use single quotes for parameters:

  -filter 'name-like' * $ PCName * '' ' 

In this string, $ PCName will not be replaced with its value. Double quotes are not important here, because inside a quoted string, they are just letters.

You can create parameters like this:

  -filters ('In addition to this, you should remove the return statement and in your example create global variable $ Global There is no need to: PCN name, you can instead use $ PCName 


angularjs - What is causing "Uncaught SyntaxError: Unexpected token finally" in angular on android browser? -


I have a hard time debugging this error. This angle is 1.3.10 It seems that the Android browser is angular Get an error in the code that is quite wired.

EDIT: The Android Browser Javascript Console says: ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.js: 16035 Unwanted syntax error: unexpected token at the end

This is Android 2.3.3

My guess is that you are angular on Android browser 2.x (1.3.10) are running.

Finally is a reserved EncismScript 3 keyword and the following syntax is not allowed in ES3:

  $ http.get (tpl, Return to httpOptions) Lastly (function () {^^^^^^^^ // it is 16065 unmanned angular 1.3.10 handlesquinfind .totalPendingRequests--;})  

In ES3, it bracket Notation should be written with:

  return $ http.get (tpl, httpOptions) ['end'] (function () {handleRequestFn.totalPendingRequests--;})  

The same goes for the other reserved keywords as hold

Edit : Here

There is a comment about the issue fixed in 1.3.14, but it seems that this is not the case. Finally, finally property is still accessed with dot notation.


How to manage certificate renewal with Java Webstart application -


I am developing Java desktop applications using Java JavaTone technology. I sign my app using a valid certificate and deploy it using JnlpDownloadServlet. I create all this infrastructure with the Maven-WebStart-Plugin.

But when my certificate expires and I have to leave my application and have to recruit again, then I am having trouble downloading my application completely to webstones. is.

As far as I know, what I can collect from the internet (WebStart official documentation is awful), version and updates based on file server time (last-modified HTTP header) by default Webstart The library looks

If this is true, then the Webstart client should fully download a new version of my application.

But instead webstart is downloading the library to the new version of JNLP file as the Maven Webstart plugin generates them.

The application fails to start, complains about various signed jars, and when I see in the Tomcat access-log, only the checked and downloaded files in the server are JNLP files, real new versions With a jar, and a second jar (I believe that it gets downloaded, is signed-checked, and fails the client) All requests are GET, no staple

I < Strong> no JNA Using version-based protocols in Libya (the active by jnlp.versionEnabled property), but the Webstart client works on it as it is running.

My JNLP update options

  & lt; Update check = "always" policy = "always" />  

I see that the only solution is updating the version number of all Jars, adds some to the version number, but JNLP "redirection" is done automatically by the webstart-plugin And I would have liked a simple and more strong approach.

Edit: It seems that the version-based download protocol is being started because in the Jar element file in JNLP version < / Code> attribute is automatically added by the WebStart plugin. This is a major functionality while managing dependency versions but it is a pain if you just want to update the signature. I found that 1.5 supports validation of Java expired signatures if they are timestamps:

/ P>

This is also well explained:

Fortunately, maven-webstart-plugin supports version 1.0-Beta 5 since:

& lt; Sign & gt; & Lt; Storetype & gt; PKCS12 & lt; / Storetype & gt; ... & lt; TsaLocation & gt; Https: //timestamp.geotrust.com/tsa< / Tsa location & gt; & Lt; / Sign & gt;

Now, the Webstart client will accept the application unless the timestamp is valid, even if my signature certificate is expired. (I have tested with a personal ca certificate and expired sign cert)

I will use the WebStart version-based protocol for actual changes in my libraries, which will speed up independent jar downloads. , And everything is fine, and the world is beautiful.


javascript - append text on search input on click -


I have some anchor elements with some text, like "cat", "cow", "dog"

For example, when I click on "cat" I want to add text to the search input.

I have tried to:

  jQuery ('.link') .on ('click', function (event) {jQuery ('input [name = "Search"] '). Val (jQuery ('. Link '). Text (). Trim ()); jQuery (' input [name = "search"] ') .keyp ();});  

But I need to listen to each anchor element and update search input accordingly, it just works once.

Any suggestions?

Instead of adding text to elements that click, the problem is due to your selector within the click function In the search box, you are writing the texts of all the elements in the search box sequentially, so that only the last .link text remains in the search box. Try it instead:

  jQuery ('.link') .on ('click', function) {jQuery ('input [name = "search"]'). Val ($ (This) .text () .trim ()); jQuery ('input [name = "search"]') .keyp ();});  

It's the one, see if it's what you wanted.


html - PHP email not getting sent with if statement -


I am trying to use php to mail an email to a user if they check the checkbox sent email Does not go. Are you ($ _ POST ["receive-access"]) === Checked ?

HTML:

  & lt; Tr & gt; You can use. & Lt; Td> & Lt; P style = "font-family: latin;" & Gt; Email: & lt; / Td> & Lt; Td> & Lt; Input type = "email" name = "mail" id = "mail" style = "font-family: latine," required & gt; & Lt; / P & gt; & Lt; / TD & gt; & Lt; Br> & Lt; / TR & gt; & Lt; Tr & gt; & Lt; Td> & Lt; Input type = "checkbox" id = "get-access" name = "get-access" & gt; & Lt; / Td> & Lt; Td> & Lt; Label = "get-access" & gt; Check this box to access restricted areas. & Lt; / Labels & gt; & Lt; / Td> & Lt; / Tr & gt;  

PHP:

  & lt ;? Php $ message = "Username: Username password: password"; $ Recipient = $ _POST ["mail"]; If (isset ($ _ POST ["get-access"]) === Checked mail ($ recipient, "restricted access username and password", $ message);? & Gt;  

Here is why you do this so the checkbox will not be present in the post if it is unchecked. If the $ {_POST ['' ('$' - '' '$' "'' 'Receipts']' & amp; $ _POST ['Receipts'] =' ' Received- login '] = true;} and {$ _POST [' get-access'] = wrong;} $ Message = "user Gm: Username password: password "; $ recipient = $ _POST [" mail "]; if (isset ($ _ POST [" receive-access "] == true) Mail ($ recipient," restricted access username and password " , $ Message);


sails.js - Sailsjs: In Sails 0.11, how to NOT use onConnect lifecycle callback with sockets -


In PAL 0.11, onconnect lifecycle has been disliked for callback sockets. The upgrade guide says that if you need to do a preliminary setup when adding a new socket, "send initial request to client after connecting the socket".

Sending a request from connected clients is quite easy. But if you are not using onconnect lifecycle callback to capture the socket on the server, how do you set up an audience for that event? Is there another way to capture the socket that set out the onconnect function for that socket?

It is a thought that on the front seal socket client to call a regular endpoint in your cell backend. To use A part of the magic of the cell roots the socket requests as if they were regular HTTP requests. So at the front end you can do this:

  & lt; Script src = "/ js / dependency / sails.io.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; // While the socket will actually be queued up to IO.socket.get ("/ helloworld", the function (response) {console.log ("received response:", response);}); & Lt; / Script & gt; The  / helloworld  route that you set up in your  config / routes.js  file, to make calls and to make any "on-connect" calls - < / Code> 

Setting Style there

You can use req.isSocket in your controller action to make sure Are there.

maven - How to configure GIRAPH 1.1.0 pom.xml for it to work with HADOOP 2.6.0 ? Installation ERROR -


I am trying to add GIRAPH 1.1.0 to HADOOP 2.6.0

To edit .xml in any way to properly package GIRAPH, I run the command mvn-phadop_yarn -Dhadoop.version = 2.6.0 package

, I edit the default pom.xml file in line (12 9 2):

<> pre & lt; ID & gt; Hadoop_2 & lt; / Id & gt; & Lt; Module & gt; & Lt; Module & gt; Giraph-accumulo & lt; / Module & gt; & Lt; Module & gt; Giraph-hbase & lt; / Module & gt; & Lt; Module & gt; Giraph-hcatalog & lt; / Module & gt; & Lt; Module & gt; Giraph-hive & lt; / Module & gt; & Lt; Module & gt; Giraph-gora & lt; / Module & gt; & Lt; Module & gt; Giraph-rexster & lt; / Module & gt; & Lt; Module & gt; Giraph-district & lt; / Module & gt; & Lt; / Module & gt; & Lt; Properties & gt; & Lt; Hadoop.version & gt; 2.6.0 & LT; /hadoop.version>

But when I place an order to run it

  [INFO] Apache Giraffes guardian .............. ............... Success [4.183] [INFO] Apache Giff Core ........................ ........ Failure [5.364] [INFO] Apache Thief Examples ............................ SKIPPED [INFO] Apache arrest distribution ........................ SKIPPED [INFO] ------------------ ------------------------------------------------- - --- [INFO] Build Failure [INFO] -------------------------------------- ----------------------------- [INFO] Total Time: 9.911s [INFO] Finished: Mon March 16 19 : 05: 38 EET 2015 [INFO] Last Memory: 55m / 1020m [INFO] ------------------------------ ---------------- -------------------------- [ERROR] Failed to execute the target organization .apache.maven.plugins: maven-compiler-plugin: 3.0: Compile project on Giraffe core (default-compilation): compilation failure: compilation failure: [error] / usr / local / giraph / giraph / giraph-core / target / munged / main / org / apache / giraph / com / netty / SaslNetty Client.java:[8468] The symbol can not be found [ERROR] Symbol: Variable SASL_PROPS [ERROR] Location: class org.apache.hadoop.security.SaslRpcServer [ERROR] / usr / local / giraph / giraph / giraph -core / target / mouth / main / organization / apache / giraf / com / netty / sensationality AVERA: Java: [105,62] Icons can not be found [Error] Icons: Variable SASL_PROPS [Error] Location: Class org.apache.hadoop.security.SaslRpcServer [Error] - & gt; [Help 1] [Error] [Error] To see the complete stack traces of errors, re-run Maven with the -i switch [ERROR] To enable full debug logging, Maven, using the X switch, Run. [Error] [Error] For more information about errors and possible solutions, please read the following article: [Error] [Help1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [Error] After fixing the problems, you get the command [ERROR] MVN & lt; Goals and gt; With Build can resume build. -rf: giraph-core  

My question is how should it be modified pom.xml to work with hasoop 2.6.0?

You are changing the hasoop version of the wrong profile with the "-P" parameter , You are choosing it wrong.

To make the Giraffe with a hoopop_2 profile, you should use -Phadoop_yarn instead of -Fedopop_2 , like this:

  mvn-phadoop_2 -Dhadoop.version = 2.6.0 package  

However, if you use Phadoop_2 profile, you will not do SASL_PROPS < To be able to resolve the error related to the / code> variable, therefore, you should use the -Phadoop_yarn profile (but instead) to avoid it.


memory - Write large files to disk in Objective C -


I have a large file that I get through a web service that I am trying to write to disk . I can write most files on disk, but this and other files of this size (or more) are causing problems. When I try to change the string of bits to NSDT after receiving memory warnings, the app will crash. Here's the code I'm using:

  NSString * bits = / * string file stream * /; NSDTA * FileData = [[NSDTTA Alloc] InitVithbabs64 encoded string: BITS option: 0]; The app will crash when attempting to create  

file data variable. Is there a standard for doing this process that I can not follow the following or have some tricks to work with big files?

Thank you in advance! This issue is really bothering me.

A bit more info

It seems that due to large quantity of bits, the string will cause the accident due to the data in the file string Not even sure how to get rid of this.


sql - Why I obtain this error message when I try to perform this simple query that insert a record inside a table? -


I am very new to the database and I have the following problem.

I have is on Oracle DB KM_COUNTRY_AREA table called with the following structure:

  column name DATA_TYPE NULLABLE DATA_DEFAULT COLUMN_ID ------- ----------- --------------------------------------- ----------- ------------ IDCOUNTRYAREA NUMBER (190) No (empty) 1NoFolderVARCHAR2 (255 CRA) Yes (empty) 2 COUNTRY_ID COUNTRY NUMBER (19.0) Yes (empty) 3  

then the IDCOUNTRYAREA field I think is a self-generated field (because the table was created using hibernate And this field is in the @ id and The Divisional Series @ generatedValue ).

So now I have to put some records directly in DB (I need to do some tests) but I have a problem writing the query, inserting, I am following this tutorial:

< P> And I have to make this SQL statement:

  inserting in KM_COUNTRY_AREA (IDCOUNTRYAREA, NOMEFOLDER, COUNTRY_IDCOUNTRY) value (empty, "Brazil", 715);  

I have placed the column value for null because it must be generated automatically (but I think it is wrong).

It does not work and I get the following error message:

  Errore con inizio Alla Riga 1 nail Comando: INSERT INTO KM_COUNTRY_AREA (IDCOUNTRYAREA, NOMEFOLDER, COUNTRY_IDCOUNTRY) values (zero, "Brazil", 715) Errore alla Riga del Comando: 2 Colonna: 14 report errori: Errore SQL: ORA-00984: Colonna 00984. questo case Consentita non-00000 - "are not allowed here" column * reason: * action :  

How can I resolve this problem and insert my line correctly in my KM_COUNTRY_AREA table Can i do

Tnx

EDIT-1:

I tryied to modify:

  inserting in KM_COUNTRY_AREA (IDCOUNTRYAREA, NOMEFOLDER, COUNTRY_IDCOUNTRY) value (zero, 'brazil', 715);  

But I get the following error message:

  Errore con inizio Alla Riga 1 nail Comando: INSERT INTO KM_COUNTRY_AREA (IDCOUNTRYAREA, NOMEFOLDER, COUNTRY_IDCOUNTRY) values ​​(null , 'Brazil', 715) reported error: Errore SQL: ORA-01400: .. ( "PRC_KM_OWNER" impossibile e-mail address zero "KM_COUNTRY_AREA" "IDCOUNTRYAREA") 01400. 00000 in - "(% s) can not insert null" * Reason: * Action:  

It seems that I can not be null to the primary key, but it is strange because I have decided to be in hibernation as the area:

@ id @ generated Private private id idiots;

So I think its value should be automatically generated, what's wrong?


c++ - program has stopped working?How to have int array size exceeding 1,000,000? -


Assignment: Write a C ++ program on Ertostenes sieve and print all major numbers between 1 and 1,000,000. I have realized that when I actually have a large number like 1,000,000, the program stops working and this program works perfectly well for small numbers like 9,000. Is there a way to form 1,000,000 integer array sizes?

  #include & lt; Iostream & gt; using namespace std; Zero sieve (int [], int num); Int main () {int numOfElements; Cout & lt; & Lt; "Please input number" & lt; & Lt; Endl; CIN & gt; & Gt; NumOfElements; Int [numOfElements]; Sieve (primers, numbers); Return 0; } // prime number: any whole number greater than one and has only numbers and the same factors are zero sieve (integer prime [], integer number) {int i, j; For (int a = 0; a & lt; num; a ++) {principal [a] = a + 1; } Prime Minister [0] = 0; // We know 1 is not the prime minister; For (i = 2; i & lt; = num; i ++) {if (principal [i-1]! = 0) {cout < & Lt; I & lt; & Lt; Endl; } For (j = i * i; j & lt; = num; j + = i) {principal [j-1] = 0; } <}   

being able to write int primeArray [numOfElements]; (This is a variable length Array) is an compiler extension : not part of standard C ++ I hope your compiler is warning you about it; If not, then make sure the warning level is set correctly.

But in this case it is an important issue: an effort to allocate such a large array will fail on the stack will fail. Stacks are limited to the size of a sequence of megabytes of magnitude.

The best solution is to use a std :: vector , which is (i) standard C ++, and (ii) stack Will allocate memory.

If you want to use an array, then you int * primeArray = newAnt [numOfElements] . Do not forget to clear memory by using Delete [] .


Why use an empty element in XML? -


Route amateur here I get instructions on how to use empty element in XML. But why would you do it? What will be used for this, (I think) to add a blank record other than when the XML is parsed?

Here is information from W3Schools:

"The empty XML element is not any content, it is empty. In XML, you can point to an empty element like this : Code> & lt; element & gt; & lt; / element & gt; or you can use an empty tag like this (the element syntax of this type is called self-termination) <00>

Text "itemprop =" text ">

If a schema is tagged in a tag Isi certainly must exist in order, you may have to include the tag even if the blank value. For example, the following piece from the schema indicates that you should first tag the tag bar:

  & lt; Xs: element name = "parent" & gt; & Lt; XS: complexType & gt; & Lt; XS: Sequence & gt; & Lt; Xs: element name = "foo" min oscurs = "1" maxOccurs = "1" /> & Lt; Xs: element name = "bar" minOccurs = "1" maxOccurs = "1" /> & Lt; / XS: sequence & gt; & Lt; / XS: complexType & gt; & Lt; / XS: element & gt;  

Then the following piece will be valid:

  & lt; Parents & gt; & Lt; Foo / & gt; & Lt; Times> Asdf & lt; / Bars & gt; & Lt; / Parent & gt;  

But the following will not be:

  & lt; Parents & gt; & Lt; Times> Asdf & lt; / Bars & gt; & Lt; / Parent & gt;  

Additionally, you can use an empty tag to represent an empty value (as opposed to a zero value). However, if you are trying to represent zero value in XML then you should actually use a xsi: nil attribute


sed: 1: "...": Invalid command code f -


  grep -l \ 'texttofind \' * | When I run the above command in the terminal, I get this error. I  
  sed: 1: "forkliftDailyChecklistW ...": invalid command code F  
< P> I have seen many forums and I have not got anything about Code F Any help / insight will be appreciated

I came to know what was wrong with me '' must be added after -i and before 's /../../' / / code>:

  grep -l \ 'texttofind \' * | Xeroes SAD -i 'S / Toureplay / Replacement / G'  

debugging - Android : dexDebug -


I try to start my first Android app, Hello word "Although I had 14errors that I could not find any solution.

People who help ur help is Regards

Error: Execution failure for work: app: dexDebug '.

  & gt; Com.android.ide.common.internal.LoggedErrorException: Failed to run command: d: \ Profiles \ fSabil \ AppData \ Local \ Android \ sdk \ build-tools \ 21.1.2 \ dx.bat --dex --no- optimize --output D: \ profiles \ fSabil \ AndroidStudioProjects \ PremiereApp \ apps \ Construction \ intermediate \ tmp \ Dax: \ profiles \ fSabil \ AndroidStudioProjects \ PremiereApp \ apps \ \ intermediate \ Dax \ debug --input- list = D Build \ debug \ inputList.txt Error Code: 1 Output: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.cf.iface.ParseException: Class Name (Com / Project / Test / Premier App / BuildConfig) Path Does not match (com / android.d.d.c.cf.direct.directClassFile.parse0) at com.android.dx.cf.direct.DirectClassFile.parse (DirectClassFile.parse) on Project / Test / PremierRep / BuildConfig.class) . 406) com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary (DirectClassFile.java:388) on com.android.dx.cf.direct.DirectClassFile.getMagic (DirectClassFile.java:251) on com.android.dx .command.dexer.Main.processClass (Main.ja Va: 704) at com.android.dx.command.dexer.Main.processFileBytes (main.java:673) com.android.dx.command.dexer.Main.access At $ 300 (Maine.Java: 83) com.android.dx.cf.direct at com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:170) android.dx.command.dexer .Main $ 1.processFileBytes (Menkjawa: 602) .ClassPathOpener.processDirectory (ClassPathOpener.java:229) com.android.dx on com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:158. cf.direct.ClassPathOpener.processDirectory (on ClassPathOpener.jav: 229) com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:158) com.android.dx.cf.direct.ClassPathOpener.pro On cessDirectory on com.android.dx (ClassPathOpener.java:229) on .cf.direct.ClassPathOpener.processOne com.android.dx.cf.direct.ClassPathOpener.processDirectory (ClassPathOpener.java:229) (ClassPathOpener.java: 158) com.android.dx.cf.direct.ClassPathOpener t.ClassPathOpener.processDirectory on com.android.dx.cf.direct.ClassPathOpener.processOne (ClassPathOpener.java:158) com.android.dx.cf.direc. ProcessOne (ClassPathOpener.java158) at com.android.dx.cf.direct.ClassPathOpener.process at (ClassPathOpener.java:229) (ClassPathOpener. Java: 144) at com.android.dx.command.dexer.Main.processOne (main.java:632) mand.exer.main.processAllFiles (main.java.t10) com.android at com.android.dx.com On .dx.command.dexer.Main.RunMonoDex (main.javamore80) at com.android.dx.com mand.dexer.Main.Run (main .java 46) at com.android.dx.command.dexer. On Com.android.dx.command.Main.Main (main.java:106) Main (Main.Java Gallery 15) ... Com / Project / Test / PremiereUp / BuildConfig UNEXPECTED TOP-LEVEL EXCEPTION: Com.android.dx.cf.iface.ParseException: Class name (com / project / test / premiere app / R $ enimate) path on com.android (com / project / Test / premiereapp / r $ anim.class). .dx.cf.direct.DirectClassFile.parse0 (Direct ClassFile. Gift T20) at com.android.dx.cf.direct.DirectClassFile.parse (DirectClassFile.java:406) with m.android.dx.cf.direct. DirectClassFile.parseToInterfacesIfNecessary (DirectClassFile.java:388). . . .  

at Com.android.dx.command.dexer.Main.processOne (main.java:632)

u2netdk - Unable to update unidata from .NET -


The last few days I used to update Unidata using sample code as a base without success Is trying for I can read the database successfully and see raw data in Visual Studio. The error reported back is outside the error limit. The program is trying to update the unit value of a purchase order

Error:. {"Error received index on the socket was outside range of array.POD."} [IBMU2.UODOTNET.UniFileException]: {"Error received index on socket was outside range of array.POD."} Data: {} System. Collections.ListDictionaryInternal HELPLINK: Null HRESULT: - + 2146232832 InnerException: Null message:. "Error received on the socket was outside the UniFile class" StackTrace: ": array.POD" source "limit on IBMU2.UODOTNET.UniFile.Write () \ r \ n IBMU2.UODOTNET.UniFile.Write (string aRecordID, UniDynArray ARecordData) at \ ReadXlsToUnix \ ReadXlsToUnix \ Form1.cs \ Users \ xxx \ Documents \ Visual Studio 2013 \ Projects: Line 330 "TargetSite: {Write Zero ()}

Test code is failing:

  Private zero testUpdate (string PO_LINE_SHIP, string price) {UniFile pod = null; UniSession uniSession = Null; // connection string uniSession = UniObjects.OpenSession ("unixMachine", "user id", Properties.Settings.Default.PWD, "train", "UDCs"); // Open file pod = unions. CretUnophile ("POD"); Read the data pod. Read (PO_LINE_SHIP); // locking strategy pod.UniFileLockStrategy = 1; Pod.UniFileReleaseStrategy = 1; If (pod. Record id == "") {pod.UnlockRecord (); } // current pointer to user pod.record Replest (4, replace with string) uniSession.Iconv (value, "MD4");); Try {Pod.Write (pod.RecordID, pod.Record); // Record ID and record both correctly hover / instant window // pod Write () fails with the same message} Catch (exception mistake) {MessageBox.Show ("Error" + mistake); } Pod.Close (); UniObjects.CloseSession (uniSession); }}  

HP UX running at 11.31 unidata 7.2 and using UODOTNET.dll 2.2.3.7377 Any help is greatly appreciated. It is a record version of writing and they have also tried to write the functionality with the same error.

Rajan - Thanks to updates and links I have tried to read / update my Unidata Tables by using U2 Toolkit although I can read / update a file in the same account . Does this mean that for example, some VOC, DICT is missing?


mongodb - Mongoexport to multiple csv files -


I have a large Mongolia collection I want to export this collection to CSV so that I can do data analysis It can be imported into the package.

There are about 15 GB documents in this collection, I want to split the archive into ~ 100 equal size CSV files. Is there any way to use this Mongoxport? I can also query the whole collection with pymongo, split it and write CSV files manually, but I think it will be slow and require more coding.

Thanks for the input.

You can call it - skip & amp; - boundary option.

For example, if you have placed 1000 documents in your collection, you can use it script loop:

  loops = 100 count = Db.collection.count () for batch_size = count / loops (i = 0; i  

Export, keeping in mind that your document size is equal.

However, note that this large stops is slow

Lower bound repeated iterations will be faster than upper bound iterations.


Case statement in Oracle for selecting single row -


मेरे पास निम्न डेटा के साथ एक तालिका 'tblA' है:

  wuser_id wcomatted wstatusdate 123 1 10212014 123 0 11212014 456 0 02222014 456 0 03122014 मैं wsatusdate wuser_id '123' के लिए wcompleted के आधार पर चयन करना चाहते हैं, जब कम 1 है तो मुझे केवल '10212014' चुनना होगा, के लिए '456' जब कम हो तो 0 है तो मुझे केवल '03122014' को चुनना होगा मुझे नीचे दिए गए प्रश्न, user_is 123 के लिए दो पंक्तियों को लौट रहा है।  

नीचे मैं जो कर रहा हूं,

  अलग wuser_id का चयन करें, जब 1 से अधिकतम (wstatusdate) 0 तब अधिकतम (wstatusdate) tblA समूह से wuser_id, wcompleted  

परिणाम:

  wuser_id wstatusdate 123 10212014 123 11212014 456 03122014  < / Pre> 

मुझे परिणाम होने की आवश्यकता है:

  wuser_id wstatusdate 123 10212014 456 03122014  

आप निम्न की तरह कुछ प्रयास कर सकते हैं:

  SELECT wuser_id, wcomatted, wstatusdate FROM (SELECT wuser_id, wcompleted, wstatusdate, ROW_NUMBER () ओवर ( WUSER_ID द्वारा विभाजन द्वारा अधूरा डीईएससी, डब्लूएसएटीएसएडी डीईएससी) एएस आर एन एफएलए द्वारा) जहां आरएन = 1;  

या आप निम्न कार्य कर सकते हैं:

  SELECT wuser_id, MAX (wcompleted) के रूप में wcompleted, MAX (wstatusdate) KEEP (DENSE_RANK फर्स्ट ऑर्डर वाईफप्लेटेड डीईएससी ) के रूप में टीबीए ग्रुप द्वारा wuser_id से wstatusdate;  

python - How to set Gtk Icon Theme with PYGtk? -


मैं पायथन (पीवायजीटीके 3) के साथ वैश्विक सिस्टम आइकन थीम कैसे सेट करूं?

यह लौट रहा है सिस्टम में वर्तमान आइकन थीम यह सही काम करता है। G.repository आयात Gtk, GObject, Gio, GLib प्रिंट (Gtk.Settings.get_default) से

  प्राप्त करें। Get_property ("gtk-icon-theme-name")) < / कोड>  

लेकिन मैं इसे सेट नहीं कर सकता। मैंने इसे करने की कोशिश की, लेकिन बिना किसी परिणाम के: । जीपी, , "न्यूमिक्स")

धन्यवाद!

आपको जांचें कि आप जो थीम चाहते हैं वह निर्देशिका / path / to / Python / xx / lib / site-packages / gnome / share / themes / में मौजूद है।

तब, पहले प्रोग्राम / स्क्रिप्ट जीटीके विंडो को आरम्भ करता है, उपयोग करने के लिए थीम सेट करें:

  आयात करें stderr से, बाहर निकलने की कोशिश करें: gi gi.require_version (gtk ',' 3.0 ') जीआई से आयात करें (जीटीके आयात नहीं किया जा सकता कृपया, कृपया इसे स्थापित करें।) वर्ग HelloWindow (Gtk.Window): def __init __ (स्वयं): जीटीके। जीटीके, जीडीके, जीओबीजेक्ट, जीओआईबी, जीएलआईबी (आयात ईर्रर, आयातवार्इन्ग) को छोड़कर। सेटिंग्स.गेट_डेफ़ॉल्ट ()। सेट_प्रॉपर्टी ("gtk-icon-theme-name", "Numix") Gtk.Settings.get_default ()। Set_property ("gtk- थीम-नाम", "MS-Windows-XP") Gtk विंडो .__ init__ (आत्म, शीर्षक = "हैलो वर्ल्ड") ...  

c# - Avoid UI Lockups when doing lots of PropertyUpdates -


You are trying to find the best way to avoid UI-lockpages when you have a lot of updates Are doing so.

The basic premise is that at the start of my device a strong FSTAT runs within a background employee, resulting in a large list of files and their information. Once this is complete, in my runawakker's compounded function, I again broadcast this information in the UI inside TreeView.

However, this includes lots of asset updates! Depending on the number of files which can be 5000+ files for its promotion, it completely locks the UI for about 3-5 seconds.

I was thinking that I can update the UI asynchronously, as I say, promote 10-20 files at a time & amp; However, continue to update the UI thread so that its still sensitive.

Thank you.

If you are updating information inside TreeView using property bindings, then you can set your bindings. You can set the flag on the right. If you are not updating the values ​​using bindings, then it may be something to see.

Another option would be to update all your properties, but for the property (assuming you are using your bindings to update) when All your data will not change, and then call the contact program on the task for each of your properties, it is still uneven, but it should not be 5000+ binding updates, take 3-5 seconds.


Javascript prototype inheritance of functions -


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

  • 2 जवाब

मैं थोड़ी देर के लिए googled है अब और ऐसा संभव नहीं लगता है, इसलिए मेरा अंतिम मौका यहां पूछना है: क्या समान नाम वाले फ़ंक्शन वाले प्रोटोटाइप से आने वाले किसी फ़ंक्शन के साथ एक ऑब्जेक्ट होना संभव है?

उदाहरण के लिए सी # यह इस तरह दिखता है:

  सार्वजनिक वर्ग बेवकूफ उदाहरण {सार्वजनिक वर्चुअल टेस्ट} (// मैं यहां पागल सामान करता हूं}} सार्वजनिक वर्ग टेस्ट: बेवकूफ उदाहरण {सार्वजनिक ओवरराइड टेस्ट (आधार) {बेस ।परीक्षण(); / / <>  

संपादित करें: मैं यह उल्लेख करना भूल गया था कि मुझे सादा जावास्क्रिप्ट या JQuery का उपयोग करना पसंद नहीं है जैसे कि mootools

संपादित करें: यह हिसाब के लिए किस प्रकार दिखेगा?

  MyOriginBase = function () {}; MyOriginBase.prototype.MySuperFunction = फ़ंक्शन (arg1) {चेतावनी ("उत्पत्ति" + arg1); }; माइबेस = फ़ंक्शन () {MyOriginBase.call (यह); This.m_Stuff = 0; // आदि }; MyBase.prototype.MySuperFunction = समारोह (arg1) {MyOriginBase.prototype.MySuperFunction.call (यह, arg1); चेतावनी ("बेस" + arg1); }; MyBase.prototype = नया MyOriginBase (); // innherit MyChild = function () {MyBase.call (this); This.m_OtherStuff = 1; // आदि }; MyChild.prototype = नया MyBase (); // इनहेरिट माय चाल्ड.प्रोटोटाइप.माइस्परफंक्शन = फंक्शन (आर्ग 1, आरजी 2) {मायबेस। प्रोटोटाइप। माइस्परफ़ंक्शन। कोल (यह, आर्ग 1); चेतावनी ("सबब्रो" + आरजी 2); }; Var m = नया MyChild (); m.MySuperFunction ( "34,534" "grtg");  

काम नहीं कर रहा है ...

हाँ, आप कर सकते हैं सुपर फ़ंक्शंस का वर्णन करते हुए।


How do I add buttons to an MS Access form at run time with VBA and add code to the _Click() event -


I have to add buttons to a form at run time for access, specific information clicked on button Will need to open a model form. So for example, if I create five buttons and write a loop named button 1, button 2, button 3, button 4 and button 5; How do I get the following:

  Private sub button 1_Click () msg ​​button "button 1 clicked" end sub personal sub button 2_Click () Msgbox "button was clicked 2" end Sub Personal Sub Button 3_Click () Message Box "clicked button 3" End sub personal sub button 4_Click () msg ​​button "button was clicked 4" end sub personal sub button 5_Click () Msgbox "button was clicked 5 "End Sub  

This is a simplified version of what I want to achieve, but it's a summary. Am I right thinking about this? What better way?

I am using MS Access 2010.

Any help is appreciated. Thank you

Here you can create an event process (click ()) for a control (command button) ) Nominate cmdDemo on the current form

  Modulate the control of slow CTL as modul module as the module set frm CTL = m! [CmdDemo] 'set a reference for the command button frm = m' Set the context of the form set mdl = Me.Module 'Set a reference to the code module of the form' One Click () Event Process for Command button cmdDemo LngReturn = mdl.CreateEventProc ("Click", ctl.Name) 'insert a single line code mdl.InnsertLines lngReturn + 1, "Msgbox" "Process Demo" "" in the event process ""  
< / Div>

http - Is it possible to make a Web link which will determine the default value in a drop down on the target page? -


I want to create several links on the same page, a different value on the landing with each drop down menu.

Then a "Tom" populate will be downconverted from the link, link two "Dick", and three "Harry".

Is it possible, and how do you do it? I can not see something similar, but I can also fail in my Google-FU.

Many thanks in advance!

What price can you can add a GET request on each link, the new page For example, you can link to:

destination.php? Start = Tom

and you can get the $ _GET ['Start'] value on the destination and HTML & lt; Select & gt; Use this to set a selected = selected value in the statement.

Your question is somewhat unclear but I think this is the answer you need?


python - cross product versus determinant -


I am trying to determine the surface area of ​​a 3D volume by using pyqtgraph and numpy using isosurfaces in Python . The problem is not in the generation of isosurface, but in calculating the field from the vector.

If properly understood, the cross product of 2 vectors (AXB) defines the area of ​​parallologlog in the magnitude of the product. Similarly, the determinant of a 3x3 matrix, where the first line unit vectors determines the area of ​​paralaglogram of the vectors determined by the second 2 rows.

I am using the code given below, but I am getting different answers (though of the same magnitude)

  np.linalg.norm (n, Ord = 1)  

185088.05

  triarea = (np.abs (np.linalg) .det (tryges)) Original = np.sum (triarea)  

289059.69600568933 Anyone have any ideas on what's happening here?

The following is the full Python code I am using.

#import tiff file print ("Loading volume ...") Img = tifffile.imread (r "C: \ Users \ Nachiket \ Desktop \ C1-confocal-series." Tif ") print (print" expired ") (" Isis is generating isosfres ... ") verts, faces = pg.isosurface (Img, img.max () / 5.) Print (" full ") # vertical Creating an indexed array of tris = verts [faces] #calculate from the generic area n = np.cross (tris [::,, 1] - tris [:: ,, 0], tris [::, 2] - tris [::, 0]) narea = np.linalg.norm (n, ord = 1) trycc = np.zeros (tris .shape) using #ccalculate unit vectors tryges [::, 0] = ([[1 , 1,1]] #unit vectors tryges [::, 1] = (tris [::, 1] - tris [::, 0]) Tryges [::, 2] = (tris [::, 2] - Tris [::, 0]) triarea = np.abs (np.linalg.det (tryges)) tot = np.sum (np.abs (triarea))

P E> tryges [::, 0] = ([[1,1,1]] #unit vectors tryges [::, 1] = (tris [::,, 1] - tris [::, 0] Tryges [^, 2] = (tris [::, 2] - tris [::, 0])

type

  tryges [0, ::] = ([[1,1,1]] #unit vectors [1, ::] = (tris [1, ::] - tris [0, ::]) tryges [2, :: ] = (Tris [2, ::] - tris [0, ::]) To define this field, for determiners, the definition of the vector with the line Committee should Matrix but you are specifying the vector arm in the columns of the matrix 


reference - POVRay referencing object rotation values -


How can I reference an object in POVRay? I mean I will rotate the second object from the rotation value of my Z axis to the second object on the x axis.

I'm thinking about some time like this (it does not work at all, only to show you what I mean):

  // Before I declared two objects object called obja; ObjB Object {Rotate ObjA & lt; Objb.rotation.z, 0, 0> }  

Any suggestions, please?

Synchronize objects through a variable, example:

  #declare rotation = & lt; 5, 3, 4 & gt; Object (Objeb rotation will rotate object) Rotate the object & lt; Rotation.x, 0, 0> }  

Note that if you change the rotation later (redefined), then you manually rotate the objects in the vrotate () function.


How to return NSDictionary in swift, while waiting for its value to be set? -


Please leave me (: string, baseurl: url string) to speed up new

My problem was that I could not return my NSDictionary. This is my function

  is the personal function request - & gt; NSDictionary {var dict: NSDictionary! Request on request = HTTPTask () request.requestSerializer = HTTPRequestSerializer () request.requestSerializer.headers [headerKey] = getToken () // a header value request.baseURL = baseurl request.GET (URL, example by adding parameters: zero, success: Error on NSData {go str = NSString? (Data: Encoding: NSUTF8StringEncoding) if the data in response to the above data = response.responseObject {(Response: HttpResponse): NSError dict = NSJSONSerialization.JSONObjectWithData (Data, Options: NSJSONReadingOptions.MutableContainers , Error:; :)}}, failure and NSDictionary println ("\ (dict response)": error) {(error: NSError, response: HttpResponse) println  

return dict {} but when I read println ("Reaction: \ "Dict \"), my data is logged under the function.

I think my function returns a blank object because the GET method is running in a different thread and is waiting for a response.

Can anyone help me, no one will comment.

You are okay, the request runs in asynchronous form in another thread, Suggestion using handler is.

  Private func request (url: string, berserl: string, complete: (result: nsDictionary) -> zero) {var dict: NSDictionary! Request on request = HTTPTask () request.requestSerializer = HTTPRequestSerializer () request.requestSerializer.headers [headerKey] = getToken () // a header value request.baseURL = baseurl request.GET (URL, example by adding parameters: zero, success: Error on NSData {go str = NSString? (Data: Encoding: NSUTF8StringEncoding) if the data in response to {data: response: response.responseObject in {(response: HttpResponse): NSError dict = NSJSONSerialization.JSONObjectWithData (data, options: NSJSONReadingOptions.MutableContainers Error:; :) Completion (result: dict)}}, Failure: Error in NSDictionary println ("\ (dict response)") Root: NSError, response: HttpResponse) in println ("error: \ (error)") completion (result: zero) // This is not the best choice, the better error handler will return the error}}}  

For more information see:


linux - how to add content of variable after word in XML file -


ADD_XML चर में निम्न शामिल हैं

  गूंज "$ ADD_XML" & lt; इकाइयों & gt; & Lt; इकाई ip = "10.106.5.8" इकाई_प्रकार = "रिकग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.21" इकाई_प्रकार = "रिकग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.12" इकाई_प्रकार = "रिकॉग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.13" इकाई_प्रकार = "रिकॉग्निज डिस्कवरी" / & gt; & Lt; / इकाइयों & gt; & LT; पर्वतमाला / & gt; & Lt; / नेटवर्क & gt;  

मैं पहली बार के बाद $ ADD_XML की सामग्री जोड़ना चाहता हूं:

  & lt; नेटवर्क & gt;  

मेरी एक्सएमएल फाइल में

कृपया सलाह लें कि इसे कैसे लागू करें sed / awk या perl एक लाइनर लाइन

उदाहरण के लिए यह कैसे हो सकता है XML फ़ाइल

  & lt; / नेटवर्क & gt; & LT; इकाइयों & gt; & Lt; इकाई ip = "10.106.5.8" इकाई_प्रकार = "रिकग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.21" इकाई_प्रकार = "रिकग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.12" इकाई_प्रकार = "रिकॉग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.13" इकाई_प्रकार = "रिकॉग्निज डिस्कवरी" / & gt; & Lt; / इकाइयों & gt; & LT; पर्वतमाला / & gt; & Lt; / नेटवर्क & gt;  

मैं उस पर दोहराता हूं जो मैंने कहा

डॉन ' टी यह मत करो

नियमित अभिव्यक्ति के साथ XML को पार्स करना गन्दा है और यह टूट जाता है। कई वैध चीजें हैं जो आप एक्सएमएल के साथ कर सकते हैं जो एक नियमित अभिव्यक्ति को छिड़क देगा। (सबसे आसान और सबसे स्पष्ट - सुंदर मुद्रण आपको वैध XML देता है, लेकिन एक नियमित अभिव्यक्ति तोड़ देगा)। इसी तरह जानबूझकर गलत रूप से बना रहे एक्सएमएल बहुत बुरा है, और भी पंगा लेना करने का खतरा है।

यह भी देखें:

और:

तो ऐसा मत करो। एक पार्सर का उपयोग करें

ऐसा कुछ करना चाहिए जो आपको चाहिए (यदि आप स्रोत डेटा का थोड़ा बड़ा नमूना शामिल कर सकते हैं, तो मैं संशोधन कर सकता हूँ):

  #! / Usr / bin / पर्ल का उपयोग सख्त; चेतावनियों का उपयोग करें; एक्सएमएल :: टहलना; मेरी $ xml_text = '& lt; एक्सएमएल & gt; & Lt; नेटवर्क & gt; & lt; इकाइयों & gt; यूनिट ip = "1.2.3.4" / & gt; & lt; / इकाइयों & gt; & lt; श्रेणियां & & gt; & lt; / नेटवर्क & gt; & Lt; / एक्सएमएल & gt; '; मेरा $ मूल = एक्सएमएल :: ट्वीग-> नया ('सुंदर_प्रिंट' = & gt; 'इंडेंटेड'); # शायद इसका उपयोग 'parsefile' के बजाय $ मूल- & gt; पार्स ($ xml_text); प्रिंट करें \ "इससे पहले: \ n"; $ Original- & gt; प्रिंट; #read अद्यतन: मेरा $ to_insert = XML :: Twig- & gt; नया - & gt; पार्स (\ * डेटा); # नेटवर्क में एक नया तत्व दर्ज करें: अपने $ इकाई ($ to_insert - & gt; रूट - & gt; बच्चों) को प्राथमिकता दें {$ unit - & gt; कट गया(); $ इकाई - & gt; पेस्ट ($ मूल- & gt; रूट- & gt; प्रथम_चिल्ड ('नेटवर्क') - & gt; प्रथम_चिल्ड ('इकाइयां')); } प्रिंट "\ n बाद: \ n"; $ Original- & gt; प्रिंट; __DATA__ & lt; इकाइयों & gt; & Lt; इकाई ip = "10.106.5.8" इकाई_प्रकार = "रिकग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.21" इकाई_प्रकार = "रिकॉग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.12" इकाई_प्रकार = "रिकॉग्निज डिस्कवरी" / & gt; & Lt; इकाई ip = "10.106.3.13" इकाई_प्रकार = "रिकॉग्निज डिस्कवरी" / & gt; & Lt; / इकाइयों & gt;  

How to create the sentinel NIL object in a red black tree in C++? -


I want to apply a red black tree but I am battling basic steps. I am used to using structs only, but now I want to clean it and use classes.

I want to make a special object, zero (tree member?) (Zero color is black and all the nodes refer to this single object, CLRS says, "T. NIL One object is the same quality as the normal node, its color is black and its left, right and P properties can be considered arbitrary "," We all use a guardian T.nil to represent NIL ") < / P>

How do I get left, right, P to zero What? For the first time, should a separate singleton class be made and then used in the definition of the tree? When i t Allot NLs (comments) I am getting errors now

  #include & lt; Iostream & gt; Enum color_t {red, black}; Class tree; // Announce Tree * T; Class node {// can be a straight one! Public: int data; Color_t color = red; Node * left; Node * true; Node * guardian; Node () {// default constructor left = t-> Zero; // Error: Member irrevocable type entered in true = T-> Zero; // Error: member incomplete kind of parent = t- & gt; Zero; // error: member access in incomplete type) node (int d, color_t c) {// if data and color nodes are (known); Data = D; Color = C; }}; Square tree {public: node * route; Node * zero; Tree (); Insert zero (int d); Invalid left rotate (node ​​* x); }; Tree :: tree () {NIL = new node (); Zero-> Color = black; Root = zero; }  

to transfer the body of the node :: node () Required forward in your code; Anything defined after square tree (at the point you have, tree is declared only).


javascript - usemin not replacing paths within <!--bower:js --> blocks -


I have a problem understanding this problem (prepare), which is described here:

I think, with Usman, you can add multiple files only as a file, which would be a good idea during the creation of your JS application. I also understand how to use it, for example:

  // Simple creation work grunt.registerTask ('build', ['useminPrepare', 'concat: generated', 'Cssmin: generate', 'ugliite: generate', 'filrev', 'usen']);  

Then if you have this code:

   

The concat function will combine all those files into one file, called the APJs, and it is inserted into a .tmp folder. After this, the fraudulent task file will take APJs from the .tmp folder, leaving all JS in it, and it will be put in the dest-folder.

Let us first prepare usemin, I have another job, which distributes the original html (index.html) too. Now when Eusemen starts working, I have set it to use the distinction folder, and it should replace the old app while referencing the old app. So now, in the html inside the distributed folder, the same part should look something like this:

   

Is that correct? So now no comment tags should be left? Now I have a problem related to Usman: Status is: At the beginning of HTML, I have bower_components () for the command tag such as inside the Yugin tags:

  & lt ;! - build: js js / app.js - & gt; & Lt; Script src = "js / app.js" & gt; & Lt; / Script & gt; & Lt; Script src = "js / controllers / thing-controller.js" & gt; & Lt; / Script & gt; & Lt ;! - Boer: JS - & gt; & Lt; Script src = "bower_components / something / some_bower_component.js" & gt; & Lt; / Script & gt; & Lt; Script src = "bower_components / something / some_bower_component.js" & gt; & Lt; / Script & gt; & Lt; Script src = "bower_components / something / some_bower_component.js" & gt; & Lt; / Script & gt; & Lt ;! - Endbower - & gt; & Lt; Script src = "js / model / cheese-model.js" & gt; & Lt; / Script & gt; & Lt; Script src = "js / views / thing-view.js" & gt; & Lt; / Script & gt; & Lt ;! - endbuild - & gt;  

With this setting, everything works just fine until the EuseMen is not working at the end. Usemen's work is no longer able to change the code block. I have identified the reason why this can not happen so that's because I have those archive comments block so if I separate the different tasks, Move in, then remove those boer comment tags, and make the rest of the tag in the build, then everything works fine. I want to sort it out so that all the car Let's run it directly straight away. How can I solve it? If the comment block sees, why do they fail usemin? Can I change the Usmen option to ignore comment blocks? Or should I write rude work, after which the components of the waste are injected, those special comment blocks will be removed and the HTML has been delivered? I have these versions:

  "blanket-sliced-install": "~ 0.7.0", "solid-concurrent": "~ 0.4.1", "Garbage-clean" Clean "" ~ 0.5.0 "," blanket-content-coffee ":" ~ 0.7.0 "," content-content-compass ":" ~ 0.6.0 "," content-content-concat ":" ~ 0.3 "~ 0.7.0", "~ 0.7.0", "grunt-contrib-cssmin": "~ 0.5.0", "grunt-contrib-copy": "~ 0.4.1", "grunt-contrib-connect "~ 0.2.0", "Grant-Usmine": "~ 2.0.0",  
"" ~ ~ 0.1.3 "," trash-contrib-uglify "
< P>

Look at this answer:

Just by this I had this problem and all my lines were all line unique


parse.com - Parse Push on Android not sending -


I am developing an app for Android, which has push notification system using loop ().

I have already set the parse properly on my app because they give instructions on my tutorial, and it is working - if I "manually" notifications from the pars panel I do not send any problem.

But when I try to send push notifications from within the app, it is never sent to the destination channel, and it is also not visible in the pars log.

Take a look at my code:

  public class apps android.ap.ap.app (public application) {} override public wide on creatives () {Super. Connet ()); Start parse.in (this, "MY_CODE", "MY_OTHER_CODE"); ParsePush.subscribeInBackground (""); Parasupush push = new parspicious (); Push.setChannel ("my_example_channel"); Push.setMessage ("Test Message"); Push.sendInBackground (New SendCallback () {@Override public void done (com.parse.ParseException e) {if (e == blank) log D. ("push", "success!"); Other logs d. (" Push "," failure ");}}); }  

The callback provides zero - no errors are shown and it logs "success", and the other mobile that I am using to test the app Subscribed to "my_example_channel" - If I send them through the Pars Dashboard then notifications are received.

I subscribe to "push send code" (last code, "parse intrise ..." and "parspush" on a button click and on an on-one action "on crat" method, but the result is same

I believe I solved it! It looks like you have your parset setting Client side push must be enabled in Settings> Push> Client push enabled?> Yes. Last night I was struggling with it!


how to pass an image byte array to jdbc function call in Jmeter -


I want to call the JMBC function via Jmter and I'm able to do it with simple functions which are the text parameters But the function is now slightly changed and it takes the parameter as the byte array of the image. Please suggest how to browse an image from my PC local directory and how can I convert that image to a byte array and pass that array in JMBC call.

I think you should be able to use the solution option 3, such as with code Add a child to your JDBC request like

  import org.apache .commons.compress.utils.IOUtils; FileInputStream = New FileInputStream ("/ path / to / your / image.jpg"); Bytereon OutputStream Boss = New Bytereunootstream (); IOUtils.copy (in Bos,); Byte [] data = boss Batteryre (); Vars.put ("image", new string (data)); See image byte as  $ {image}  in the JDBC request sample and  

See Guide for Advanced Information on Bean Shell Scripting


ios - mixing objective-c and swift when subclassing -


मुझे स्विफ्ट में लिखी गई 'यूज्यूआईयूआईयूआईयूआईयूआईयूआईयूआईएल नियंत्रक' का एक उप-वर्ग मिला है, जिसे 'बेसविय कंट्रोलर' कहते हैं। मेरे पास अब 'व्यू नियंत्रक 1' नामक एक 'पुराने' दृश्य नियंत्रक है जिसे उद्देश्य-सी में लिखा गया है जिसे मैं 'बेसविय्यू कंट्रोलर' से प्राप्त करना चाहता हूं। अन्य सलाह के बाद मैंने 'प्रोजेक्ट-स्विफ्ट एच' हेडर फाइल आयात की है।

मेरी समस्या तब होती है जब इस तरह से उप-क्लासिंग

  #import & lt; UIKit / UIKit.h & gt ; #import "MyProject-Swift.h" @ इंटरफेस व्यू नियंत्रक 1: बेसविय्यू नियंत्रक @end  

त्रुटि है:

objc_subclassing- प्रतिबंधित विशेषता वाले वर्ग को subclass नहीं कर सकता

और यह @interface ... लाइन पर दिखाई देता है।

से उद्धरण


machine learning - What is suitable neural network architecture for the prediction of popularity of articles? -


I am a newbie in machine learning and also in neural networks. Currently I'm taking a course on neuronnetwork about coursera.org, but I do not understand everything. I have a problem with my thesis. I should use a neural network, but I do not know How to choose the right nerve network structure for my problem

I have a lot of data from web portals (generally online versions of newspapers, magazines). The information about the article is, for example, the name, article text and the release of the article. It also has a large amount of sequence data that captures users' behavior.

My goal is to estimate the popularity of an article (number of readers or unique user click on the article) I want to create a vector from this data and I want to feed my neural network with these vectors.

I have two questions:

1 How do I create the correct vector?

2. Which neural network architecture is most suitable for this problem?

These are very comprehensive questions

right vector how to be?

For text data, you usually use it

Which neural network architecture is appropriate for this problem?

It is very difficult to say I have the size of my vector after implementing the input neurons (where k TF-IDF) Begins with a network with: You can also select some type of feature to reduce the number of features. A good feature is the selection method.)

Then, a standard network layout is given by using a hidden layer with the number of neurons equal to the average between the number of input neurons and output neurons That is, you only need an output neuron, which shows how the article will be popular (this can be either one or a neuron).

For neurons in your hidden layer, you experiment with.

There are several other things that you can also try: weight decay, speed technique, multiple layers network, recurrent network and so on. It is impossible to say what would be best for your problem without having to use too much.


JavaScript access DOM element and run JavaScript within that element -


I'm trying to complete the following.

I have this type of element:

   

I want to change the type of element to "text / javascript" and then execute the code inside the script.

For example:

  & lt; Script type = "text / javascript" & gt; Var el = document.getElementById ("1"); El.setAttribute ("Type", "Text / JavaScript"); ... if some prepaid ..... LT; / Script & gt; Execute the code within L.  

Can this be done? Take a look at eval (), it should be able to do the work you want.


CSS image content: '\f035'; -


I was just looking through the source of the page of github.com and I wanted to add them to the clipboard button icon Code was used

 . Octicon-clippy: First {content: '\ f035'; }  

How can it make an icon without the path of the image?

I'm not sure that you are familiar with font-awesome, but also make symbols to create Unicode Uses letters. .

After saving the font-awesome stylesheets etc. In your project you can insert an image icon in simple form:

  & lt; I class = "fa fa-camera-retro" & gt; & Lt; / I & gt; You mentioned a clipboard icon, well, how easy it would be with the font:     


algorithm - Find the most hit url in a large file -



algorithm - Find the most hit url in a large file -

i reading this yelp interview on glassdoor

"we have big log file, 5gb. each line of log file contains url user has visited on our site. want figure out what's popular 100 urls visited our users. "

and 1 of solution

cat log | sort | uniq -c | sort -k2n | head 100

can explain me purpose of sec sort (sort -k2n)?

thanks!

it looks stages are:

1) log file filter

2) identical filenames together

3) count number of occurrences of each different filename

4) sort pairs (filename, number of occurrences) number of occurrences

5) print out 100 more mutual filenames

algorithm sorting unix

Populate JQuery Flot Chart with Ajax and Json -



Populate JQuery Flot Chart with Ajax and Json -

i'm trying utilize jquery flot charts http://www.flotcharts.org/ in mvc 5 application. @ moment i'm trying understanding of how work. i've used illustration code creates bar chart:

$(document).ready(function () { $(function () { var info = [[0, 5],[1, 10],[2, 15],[3, 20],[4, 25],[5, 30]]; var dataset = [{ label: "2012 average temperature", data: data, color: "#5482ff" }]; var ticks = [[0, "london"], [1, "new york"], [2, "new delhi"], [3, "taipei"],[4, "beijing"], [5, "sydney"]]; var options = { series: { bars: { show: true } }, bars: { align: "center", barwidth: 0.5 }, xaxis: { axislabel: "world cities", axislabelusecanvas: true, axislabelfontsizepixels: 12, axislabelfontfamily: 'verdana, arial', axislabelpadding: 10, ticks: ticks }, legend: { nocolumns: 0, labelboxbordercolor: "#000000", position: "nw" }, grid: { hoverable: true, borderwidth: 2, backgroundcolor: { colors: ["#ffffff", "#edf5ff"] } } }; $.plot($("#placeholder"), dataset, options); }); });

if utilize jquery flot charts, i'd need able pull info in dynamically via ajax opposed beingness hard coded razor view above.

i created action in controller returns same info hard coded illustration above

[httpget] public actionresult gettestdata() { homecoming json(new[] { new[] { 0, 5 }, new[] { 1, 10 }, new[] { 2, 15 }, new[] { 3, 20 }, new[] { 4, 25 }, new[] { 5, 30 }, new[] { 6, 35 } },jsonrequestbehavior.allowget); }

i amended code in razor view commenting out info , plot calls , replaced them ajax request

//var info = [[0, 11],[1, 15],[2, 25],[3, 24],[4, 13],[5, 18]]; //$.plot($("#placeholder"), dataset, options); $.ajax({ type: "get", url: '@url.action("gettestdata")', error: function () { alert("an error occurred."); }, success: function (data) { $.plot($("#placeholder"), dataset, options); } });

this ajax request should phone call gettestdata action in controller , homecoming json data. however, i've set break point on gettestdata action, debugged, , action never gets called, hence info never returned in order create bar chart.

could please help me find out why action isn't called ajax code.

thanks feedback.

folks, problem line of code

var dataset = [{ label: "2012 average temperature", data: data, color: "#5482ff" }];

was outside of ajax call. meant within line of code, variable data beingness assigned, yet didn't exist.

therefore solution move flot chart specific code within success function of ajax call,

$.ajax({ type: "get", contenttype: 'application/json; charset=utf-8', datatype: 'json', url: '/statistics/gettestdata/', error: function () { alert("an error occurred."); }, success: function (data) { //alert("success."); var dataset = [{ label: "2012 average temperature", data: data, color: "#5482ff" }]; var ticks = [[0, "london"], [1, "new york"], [2, "new delhi"], [3, "taipei"], [4, "beijing"], [5, "sydney"]]; var options = { series: { bars: { show: true } }, bars: { align: "center", barwidth: 0.5 }, xaxis: { axislabel: "world cities", axislabelusecanvas: true, axislabelfontsizepixels: 12, axislabelfontfamily: 'verdana, arial', axislabelpadding: 10, ticks: ticks }, legend: { nocolumns: 0, labelboxbordercolor: "#000000", position: "nw" }, grid: { hoverable: true, borderwidth: 2, backgroundcolor: { colors: ["#ffffff", "#edf5ff"] } } }; $.plot($("#placeholder"), dataset, options); } });

hopefully helps else.

jquery ajax asp.net-mvc json flot

Confused with Ado .net, Entity Framework,LINQ -



Confused with Ado .net, Entity Framework,LINQ -

i know asp .net , ado .net confused entity framework , linq. can utilize entity framework interact db without ado .net.are these 3 (ado ,entity framework,linq) alternative each other ?

please guide

i assume linq mean linq sql.

ef (entity framework) , l2s (linq sql) object-relational mappers utilize ado.net internally, encapsulating of functionality. if utilize either, you'd still using ado.net.

all 3 viable options building info access layer or code, own strengths , weaknesses. have @ post more info:

entity framework vs linq sql vs ado.net stored procedures?

linq entity-framework-4 ado.net

javascript - AngularJS Select element set the selected index -



javascript - AngularJS Select element set the selected index -

so i'm using angular , select html:

<select id="date" ng-model="selectedday" ng-change="setdate()" > <option>another option</option> <option>an option</option> </select>

this in controller:

$scope.selectedday; document.getelementbyid("date").selectedindex = "0";

the result: 3 options: 1 blank (which default selected) , 2 options made in html

what hell? why isn't default when open view "another option"

firstly, check official documentation. angularjs documented.

secondly, not utilize document.getelementbyid ("date") selectedindex = "0" - that's javascript. avoid using pure javascript when angular function available.

documentation:

https://docs.angularjs.org/api/ng/directive/select

https://docs.angularjs.org/api/ng/directive/ngselected

javascript html angularjs default selectedindex

c - Trying to set and print value of pointer -



c - Trying to set and print value of pointer -

i have code prompts user read in file has format: [name] [someint], not lines have [name]. parse each line string array, , if it's length of 2, has name , strcmp find match , prints out int associated. however, i'm running issues

error: invalid operands binary * (have ‘char *’ , ‘char *’)

when compiling @ printf("%s\n" *ans); line

char * ans = null; //open , read file line line, below code in line line while loop char ** res = null; char * p = strtok (line, " "); int n_spaces = 0, i; while (p) { res = realloc (res, sizeof (char*) * ++n_spaces); if (res == null) { exit (-1); /* memory allocation failed */ } res[n_spaces-1] = p; p = strtok (null, " "); printf("%d\n", n_spaces); if(n_spaces == 2 && (strcmp(name,res[0]) == 0)) { namematch = true; printf("match found!\n"); ans = res[1]; printf("%s\n" *ans); break; } }

printf("%s\n" *ans); ^

you're missing comma between these arguments. compiler interpreting * multiplication, , not understanding how expect multiply 2 strings.

even change, you'll (probably?) still warning types. remove * entirely; i'm pretty sure want pass string pointer printf, not first character of string.

c pointers

java - Aspectj concept in eclipse -



java - Aspectj concept in eclipse -

hi new aspectj , after several hours of browsing around net came know aspectj. , had 1 uncertainty similar immediate window in visual studio in aspectj in doing manually checking joint points...in immediate window if type variable returns value in current method. likewise, in aspectj declaring manually after calling specified function , returing variable values within method using system.out.println(). right? if wrong...correct me

from wikipeida article: aop programming paradigm aims increment modularity allowing separation of cross-cutting concerns

think caching.... concern cuts across other concerns, reading datastore. can create point cutting cache values beingness written datastore , 1 read cache when datastore beingness accessed. here link question aop utilize cases: aop utilize cases?

if want utilize aop "watch" variable, short reply can't. pointcuts can applied methods

java aspectj

ios - Why do subsequent update calls to GPUImageUIElement result in black output? -



ios - Why do subsequent update calls to GPUImageUIElement result in black output? -

problem: i'm trying apply gaussian blur changing uiview , display live blurred result using gpuimage. many of gpuimage's filters work perfectly, gpuimagegaussianblurfilterbehaves differently in unusual way. after sec update phone call of gpuimageuielement without re-instantiating input, , filter, resulting output black , blank.

example:

- (void) viewwillappear:(bool)animated { // blurinput --> blurfilter --> bluroutput gpuimageuielement *blurinput = [[gpuimageuielement alloc] initwithview:self.changingview]; gpuimagegaussianblurfilter *blurfilter = [[gpuimagegaussianblurfilter alloc] init]; gpuimageview *bluroutput = [[gpuimageview alloc] initwithframe:self.view.frame]; [blurinput addtarget:self.blurfilter]; [blurfilter addtarget:self.bluroutput]; [self.view insertsubview:self.bluroutput]; [blurinput update]; }

what happens: @ point blur working, subsequent phone call [blurinput update] (ie. underlying self.changingview when updates) results in bluroutput view turning black …unless re-instantiate blurintput/blurfilter, add together targets again, , phone call [blurinput update]. isn't necessary many of gpuimage's other filters.

notes:

the part of changingview updating it's gradient layer (cagradientlayer) in actual code 3 gpuimage variables held strong ivars.

ios objective-c gpuimage

What is Good Practice When Getting MySQL Data Using Amfphp As Strongly Typed Objects for Flex -



What is Good Practice When Getting MySQL Data Using Amfphp As Strongly Typed Objects for Flex -

i in stages of setting out architecture new project. info driven flex ui, sit down within web page, calling amfphp service mysql info populate elements within flex ui.

so many examples of how approach out of date or poorly written looking not understand flow of info set in place clear, robust practice. please review approach , allow me know if sense better.

say want display list of 'subjects', let's follow process have far.

amfphp service

having structured , populated mysql database, named 'atlasdata', have developed initial amfphp service which, using amfphp office service browser, appears returning array of typed 'vosubject' objects. on development mac (mamp installed) within 'amfphp/services/vo folder have next 'vosubject.php' file:

<?php /** * created intellij idea. * user: chris * date: 04/10/2014 * time: 18:31 */ class vosubject { /* * * class models 1 row of mysql table. has 1 field * each row of table , special field. * field $_explicittype, , value qualified * actionscript value object intend utilize in flex application model data. * if don‚t configure field correctly, in flex app * not typed actionscript class, dynamic object. * */ public $subjectid; public $subjectname; // explicit actionscript class var $_explicittype = "vosubject"; }

my amfphp service looks (note have removed of methods brevity):

<?php require_once ('vo/vosubject.php'); include ('dbaccess.php'); class atlasservice { // simple function can used test service. public function helloworld() { homecoming "hello world"; } public function getallsubjects() { // connect database using php info objects (pdo). seek { /* * dbaccess class singleton class. * create instance of class access it's methods. */ $db = dbaccess::getinstance(); // create php info object. $pdo = $db->getpdo(); } grab (pdoexception $e) { print "connection error!: " . $e->getmessage() . "<br/>"; die(); } // retrieve rows atlasdata database 'subjects' table. seek { $tsql = 'select s.`subjectid`, s.`subjectname` subjects s'; $stmt = $pdo->prepare($tsql); $stmt->execute(); // fetch of info , place in variable '$results'. $results = $stmt->fetchall(pdo::fetch_class, 'vosubject'); } grab (pdoexception $e) { print "error when fetching data: " . $e->getmessage() . "<br/>"; die(); } // close database connection. $stmt = null; $pdo = null; // homecoming array. homecoming $results; } }

using amfphp office - service browser phone call 'getallsubjects' function next returned:

it appear using code

$results = $stmt->fetchall(pdo::fetch_class, 'vosubject')

has set $results array of vosubject objects.

flex application

so want flex application phone call amfphp service function 'getallsubjects.

i advocate of view model presenter when developing flex projects know escalate in complexity. in project's infancy have created following:

views - subjectbar_view (mxml file) presenters - subjectbar_presenter (actionscript class) model - model (actionscript class)

my subjectbar_view displays list of subjects:

<s:list id="subjectlist" dataprovider="{presenter.subjects}"> <s:layout> <s:horizontallayout/> </s:layout> <s:itemrenderer> <fx:component> <s:itemrenderer> <s:hgroup paddingleft="2"> <s:label text="{data.subjectname}" width="125"/> </s:hgroup> </s:itemrenderer> </fx:component> </s:itemrenderer> </s:list>

my subjectbar_presenter provides info source list bind , property set calling method in model:

package presenters { import flash.events.event; import models.model; import mx.collections.arraycollection; import mx.events.flexevent; import vo.vosubject; [bindable] public class subjectbar_presenter { private var _model:model = model.getinstance(); private var _subjects:arraycollection; public function subjects():arraycollection { homecoming _subjects; } public function set subjects(value:arraycollection):void { _subjects = value; } // constructor. public function subjectbar_presenter() { // add together eventlistener hear property changes in model. _model.addeventlistener("subjectschanged", onsubjectschanged); } private function onsubjectschanged(event:event):void { // update property. this.subjects = _model.subjects; } public function oncreationcomplete(event:flexevent):void { // subjects mysql database. _model.getallsubjects(); } } }

my model connects server , calls amfphp service function 'getallsubjects':

package models { import flash.events.event; import flash.events.eventdispatcher; import flash.net.netconnection; import flash.net.responder; import mx.collections.arraycollection; // custom events. [event(name="subjectschanged", type="flash.events.event")] public class model extends eventdispatcher { // event names. public static const subjects_changed:string = "subjectschanged"; private static var _model:model; private var _subjects:arraycollection; private var _netconnectionobject:netconnection; private var _responder:responder = new responder(handleallsubjects, null); public function subjects():arraycollection { homecoming _subjects; } public function set subjects(value:arraycollection):void { _subjects = value; // dispatch event allow detail view update. dispatchevent(new event(subjects_changed)); } public function netconnectionobject():netconnection { homecoming _netconnectionobject; } public function set netconnectionobject(value:netconnection):void { _netconnectionobject = value; } // constructor. public function model(pvt:privateclass) { // phone call 'init' function carry out preparatory work. this.init(); } // singleton creator. public static function getinstance():model { if (model._model == null) { model._model = new model(new privateclass()); //trace("singleton instantiated"); } else { //trace("sorry--already have singleton instantiated") } homecoming model._model; } private function init():void { // phone call preparatory functions here. this.createnetconnection(); } private function createnetconnection():void { netconnectionobject = new netconnection(); //netconnection.connect( [server name] / [project folder] /amfphp); netconnectionobject.connect("http://localhost/amfphp-2.2.1/amfphp/index.php"); } private function handleallsubjects(result:object):void{ // trace(result.tostring()); // php method returns array not arraycollection. this.subjects = new arraycollection(result array); } public function getallsubjects():void { // phone call atlasservice. //netconnection.call([service name]/[function name]", [responder], [parameters]); netconnectionobject.call("atlasservice/getallsubjects", new responder(handleallsubjects, null)); } } } class privateclass { public function privateclass() { //trace("private class up"); } }

in flex project 'src' folder have created 'vo' folder , created next 'vosubject' class define subject value object:

package vo { // actionscript value object class. // must match php value object class defined within amfphp/services/vo folder. [remoteclass(alias="vosubject")] [bindable] public class vosubject { public var subjectid:int; public var subjectname:string; // constructor. public function vosubject() { } } }

it utilize of vosubject class on flex side unsure of. line [remoteclass(alias="vosubject")] pointing php class in amfphp/services/vo folder? if relative to. should read [remoteclass(alias="vo/vosubject")] because vosubject.php class within folder named 'vo' within services folder?

if debug application list displayed , populated subjectnames. great. appear subjects info source arraycollection of objects containing subjectid , subjectname not arraycollection of vosubject objects.

can please explain how ensure 'subjects' info source in 'subjectbar_presenter' class arraycollection of typed vosubject objects. additionally if sense improve approach willing learn.

thank getting end! forwards thoughts.

chris

the var $_explicittype = "vosubject"; should point actionscript class, in case 'vo.vosubject'. [remoteclass(alias="vosubject")] should match explicit type. in short, both reference actionscript class.

at first glance code seems follow mvc pattern, good. must admit skimmed through code find actual question.

mysql flex amfphp

javascript - AngularJS - mocking ngTableParams in jasmine test case -



javascript - AngularJS - mocking ngTableParams in jasmine test case -

i have created application using ng-table , application workign fine when wrote jasmine test case getting.

error: [$injector:unpr] unknown provider: tableparamsprovider

can please tell me how mock ngtableparams , test functionality

my code given below

jasmine test case

describe('testing controllers', function() { describe('testing workcontroller controller', function() { var workcontroller, $scope; beforeeach(module('wsd.workstations')); beforeeach(inject(function($controller, $rootscope) { $scope = $rootscope.$new(); workcontroller = $controller('workcontroller', { $rootscope: $rootscope, $scope: $scope }); })); it('should searchdocuments when searchdocuments() called', function() { $scope.searchdocuments(); }); }); });

script

angular.module('wsd', ['restangular', 'ngtable', 'wsd.models', 'wsd.workstations', 'wsd.workperiods', 'ngroute']) .config(function(restangularprovider, $routeprovider) { restangularprovider.setbaseurl('/rest/myuser'); $routeprovider.when('/wd', { templateurl: 'main/workstation/main.tpl.html', controller: 'workcontroller', resolve: { myworkdocuments: function(documents) { homecoming documents.getworkdocuments(); } } }).when('/wp', { templateurl: 'main/workperiod/main.tpl.html', controller: 'periodcontroller', resolve: { myworkperiods: function(periods) { homecoming periods.getworkperiods(); } } }).otherwise({ redirectto: '/wd' }); });

workstation/main.js

angular.module('wsd.workstations', []) .controller('workcontroller', function($rootscope, $scope, $filter, ngtableparams) { $scope.myvalues = [{name: "moroni", age: 50}, {name: "tiancum", age: 43}, {name: "jacob", age: 27}, {name: "nephi", age: 29}, {name: "enos", age: 34}, {name: "tiancum", age: 43}, {name: "jacob", age: 27}, {name: "nephi", age: 29}, {name: "enos", age: 34}, {name: "tiancum", age: 43}, {name: "jacob", age: 27}, {name: "nephi", age: 29}, {name: "enos", age: 34}, {name: "tiancum", age: 43}, {name: "jacob", age: 27}, {name: "nephi", age: 29}, {name: "enos", age: 34}]; $scope.tableparams = new ngtableparams({ sorting: { name: 'asc' } }, { getdata: function($defer, params) { $scope.myvalues = $filter('orderby')($scope.myvalues, params.orderby()); $defer.resolve($scope.myvalues); } }); $scope.searchdocuments = function() { // other logic }; });

first, create sure app depends on ngtable. within 'main'?

now test:

beforeeach(inject(function($controller, $rootscope, $filter, ngtableparams) { $scope = $rootscope.$new(); workcontroller = $controller('workcontroller', { $rootscope: $rootscope, $scope: $scope, $filter: $filter, ngtableparams: ngtableparams }); }));

notice how must explicitly provide every dependency parameter injector.

edit: igorzg solution work if don't want test associated $scope.tableparams

another edit: need allow angular know inject controller:

.controller('workcontroller', ['$rootscope', '$scope', '$filter', 'ngtableparams', function($rootscope, $scope, $filter, ngtableparams) { // controller code here }]);

another problem in test you're loading wsd.workstations module, doesn't have ngtable injected. need to:

angular.module('wsd.workstations', ['ngtable'])

or in test:

beforeeach(module('wsd'));

instead of:

beforeeach(module('wsd.workstations'));

javascript angularjs jasmine karma-jasmine ngtable

javascript - How do I make a (mock) bank system? -



javascript - How do I make a (mock) bank system? -

i rather confused. have searched hr explanation this.

here's deal. create (mock)bank login system. want username , password login box, , want have when click button says login, takes user specific webpage. moment, don't care how long or complex is, want utilize html, css , javascript. know languages moment. seems simple, cannot find anywhere on internet, , confused. if help me, nice.

there few elements need aware of when writing simple form in html;

the <form> tag

this describe want form , send it.

i won't go through options here, when want user submit details utilize post method. code method='post'.

you need you're sending form, webpage sort of scripting capability, such php, asp.net, or similar. code action='process.php' process.php page form beingness sent to. utilize of server side language more acceptable solution process form.

we can set these 2 parts, called arguments, within <form> tag this;

<form method='post' action='process.php'>

<input> elements

for purposes of form, we'll concentrate on text input elements.

in simplest form, input elements require name , type. name identifier know info entered in field when processing form. type text, password, email, date, , few others. we're going utilize first 2 here, code like.

username: <input type="text" name="username"><br> password: <input type="password" name="password"><br>

the <br> signifies want next bit of content on new line.

submit button

don't forget button submit. code is;

<input type="submit" value="submit">

couldn't simpler (you can alter text on button changing value).

the finished product

let's set together;

<form method='post' action='process.php'> username: <input type="text" name="username"><br> password: <input type="password" name="password"><br> <input type="submit" value="submit"> </form>

don't forget end form closing </form> tag.

hope helps.

javascript html css

jpa - Accessing the EntityManager from a JSF Converter class -



jpa - Accessing the EntityManager from a JSF Converter class -

this question has reply here:

how inject @ejb, @persistencecontext, @inject, @autowired, etc in @facesconverter? 3 answers

i'm trying write converter class convert between employee object , string (for display purposes). end goal have selectone field on form displays list of employee numbers in database.

here's have far:

@facesconverter(value = "employeeconverter") public class employeeconverter implements converter { @override public object getasobject(facescontext context, uicomponent component, string value) { employee tmp = helper.findemployee(em, value); homecoming tmp; } @override public string getasstring(facescontext context, uicomponent component, object value) { employee tmp = (employee) value; homecoming tmp.getemployee_number(); } }

so, issue i'm running helper class (which runs sql queries me - can include if needed) requires pass entitymanager. i've figured out through searching, can't include entitymanager in class because it's outside of "scope" of web stuff.

i'm new using java web, , new using databases java. can explain how can utilize converter way query database , have select box employee numbers in it.

since converter methods containing reference facescontext, can utilize 1 evaluate el-expression homecoming service in question.

if not using dedicated dataservices, utilize "helper bean", nil contain reference entitymanager:

@named public class randomhelperbean{ @persistencecontext(unitname = "yourpersistencecontext") entitymanager em; public entitymanager getem(){ homecoming em; } }

and within converter:

public object getasobject(facescontext context, uicomponent component, string value) { randomhelperbean rhb= context.getcurrentinstance().getapplication().evaluateexpressionget(context, "#{randomhelperbean}", randomhelperbean.class); entitymanager em = rhb.getem(); employee tmp = helper.findemployee(em, value); homecoming tmp; }

pretty much untested, should this.

jsf jpa converter

c# - Undo action when deleting shapes in PowerPoint -



c# - Undo action when deleting shapes in PowerPoint -

i have 2 shapes: , b in powerpoint.slide. used tutorial grab shape events including removing or creating shapes.

when got notified deleting shape a, delete shape b @ same time. powerpoint understand deleting shape a, , deleting shape b 2 separate actions. therefore, after undo, shape b shown, not shape a. however, want shape shown well. how can that?

i experiment deleting shape a, , shape b programmatically @ once:

shapea.delete(); shapeb.delete();

and if undo, powerpoint recover 2 shapes , b me. it's need.

what thinking right trigger undo manually code.

if user undos, shape b shown. @ time, check on existence of shape (by finding via shape.id or shape.name in powerpoint). if shape not exist, undo manually.

powerpoint.shape shapea = shapes[nameshapea]; if (shapea != null) { application.commandbars.executemso("undo"); }

any other workarounds?

c# vsto office-interop powerpoint-vba