Vote count: 0 I have this: import {StepOnePage} from '../../pages/step-one/step-one'; import {StepTwoPage} from '../../pages/step-two/step-two'; import {StepThreePage} from '../../pages/step-two/step-one'; import {StepFourPage} from '../../pages/step-two/step-one'; import {StepFivePage} from '../../pages/step-two/step-one'; How can I put condition in these import statements? I tried to import in the constructor, so I can apply the condition: If currentStep is 'Step1' then import StepTwoPage however, it gives me this error: EXCEPTION: Error: Uncaught (in promise): Unexpected directive value 'undefined' on the View of component 'StepOnePage' Or I can import everything as another solution, howe...
ادامه مطلبVote count: 0 I'm using wordpress, don't think that's relevant since this is just php but just putting that out there. I have two subsequent if statements, and I wondered if there is a cleaner way to do this rather than nesting them. // do action here Is it possible to combine the two rather than nest them? I'd like to have clean code. I think this will work as is, but it looks messy. asked 19 secs agoLunexsoft Let's block ads! بخوانید...
ادامه مطلبVote count: 0 How do I get pycharm to find the .txt file that i want to open? I'm trying to open a file with a simple piece of code and i keep getting this error message. error message I have tried adding a init.py file to the folder containing the file, and I have changed the parent folder to a source root folder through the interpreter. folder and subfolders containing file I'm sure that I might just be messing ip on something simple, but I can't figure out how to get it to work. I would appreciate any help. asked 1 min agoNickrby8 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I followed the tutorial deploy and run Service Stack application on Ubuntu Linux and I got my API quickly up and ruing. So far it's all plain-text though. I'd like to secure the API with SSL, especially the service receiving useame and password, but maybe everything. I'm using the regular CredentialsAuthProvider together with JwtAuthProvider at the moment, if it's relevant. Using a 3rd party OAuth2/OpenID Coect would solve the login problem, but not securing the remaining contents. Also wonder how to selectively choose which services require SSL. The stack is: mono, nginx and HyperFastCGI (and C# ServiceStack) asked 27 secs agospecimen Let's block ads! بخوانید...
ادامه مطلبVote count: 0 based on question I posted on How to find documents from the list by term in the query (if atleast one query term exists in the documents of list), I want to ask other question. that is assume we have constant query and dynamic documents which is added to list from time to time. so I want to not view documents I seen before when the program is run and want to view only new documents added to list. from the list given here assume the first three documents are seen before and the left three are new added documents which I want to view. but still my program gives all related docs rather than new one. so share me an idea how to solve it? my code in python is as follow queries = ['d...
ادامه مطلبVote count: 0 I have many json files (sample given below) present in compressed format in a S3 folder (say s3://data/) as foo.json.gz, foo1.json.gz, foo2.json.gz. One of the category (say 1010) has been mistakenly assigned and it needs to be changed across all files to 1020. How do we go about making this change and re-packaging these files in S3 with modified content? foo.json { "flower": "lilly", "animal": "cat", "category": "1010" } { "flower": "rose", "animal": "dog", "category": "1000" } { "flower": "daisy", "animal": "cat", "category": "1010" } asked 31 secs agoRpj Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have tried this two modules: https://www.npmjs.com/package/react-fullscreen https://www.npmjs.com/package/react-fullscreen-component Im using react-redux boilerplante, with webpack isomorphic tools, like this: app.use('/app', (req, res) => { .then(store => { res.send( 'n' + ReactDOM.renderToString( ) ) }) .catch(err => { res.status(err.code) res.redirect('/signin?error=true') }) }) asked 1 min agoRobsonsjre Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I know the basics of swift.I understand concepts and programs very well when I'm practicing them on the playground in the Xcode. But when I begin building the apps by watching the tutorials, I don't really understand how the things work. Im trying very hard but not in the right way.Ive taken all the basic lessons which taught me the fundamental concepts like variables, arrays, functions,classes,operators etc. What are the other basic things I need to lea in order to lea app building? Thank you in advance! asked 41 secs agoGanesh Hosur Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have written a couple of big web applications based on zend frameword, now I need to provide the source code of one application well documented and provided as html reference. Usually I use phpdocumentor2 integrated in netbeans ide to generate documentation for my projects. I know that I can customize my documentation as I want using tags (for example specifying "@link /foo/bar" for an action), my question is if exists guidelines or some documentation convention for project elements as controller's actions, views, helpers, and more. For example what is the best way to comment action's parameters passed with GET or POST? I think the use of @param tag, may generate confusion. T...
ادامه مطلبVote count: 0 I want to show stdout for my local program, which uses fabric to run two remote programs. I want to hide the stdout for the two remote programs. (I know there is a hide output option). However, I do want to show one of the print statements (can be grepped) from one of the two remote programs. How can I do this? The structure is as follows: Process 1: with settings (): run(cmd) start Process 1 Process 2: with settings (): run(cmd) Start Process 2 I can probably do: with hide('output'): run(cmd) But that hides the output of the remote program completely. I want to be able to show one particular stdout line from one of the remote programs. asked 1 min agoJobs Let's block ads! بخوا...
ادامه مطلبVote count: 0 I created a Memory store (model) based on a simple Json Schema like this and tried to put an an invalid value, however the object was still created inside the store. require( [ 'dojo/_base/declare', 'dstore/Memory', 'dmodel/extensions/jsonSchema' ], function (declare, Memory, jsonSchema) { var myStore = new Memory({ model: jsonSchema({ properties: { someProperty: { type: "number", minimum: 0, maximum: 10 }, } }) }); myStore.put({ id: 1, someProperty: -21 }); }); Next I tried to use the String Validator like this require( [ 'dojo/_base/declare', 'dstore/Memory', 'dmodel/extensions/jsonSchema', 'dmodel/validators/StringValidator' ], function (declare, Memory, jsonSchema, StringVa...
ادامه مطلبVote count: 0 I have a custom homepage which loads upon opening a new tab in Firefox. I want to reposition the caret on load but I can't find the event which will handle this on a tab load. The window.onpageshow and window.onload events do not work when the page is loaded from a new tab event, but work fine on a refresh or similar. Throwing the event in with an element has no effect either, such as:...
ادامه مطلبVote count: 0 I am tasked with finding a way to make another application appear on top of other windows (Always On Top). I am able to get processes that have a Window Title using the RetrieveProcesses() function. Once the user selects which process they want to modify, my application will call either MakeProcessOnTop or MakeProcessNormal. Both functions modify the main application's window. Before I added modifying its children, this worked correctly. I then discovered this wouldn't work on child windows (like an email in outlook) so I set off to find a way to handle child windows. The way the following code is written, it will end up messing up child windows. How do I get the handle pointer...
ادامه مطلبVote count: 0 I am new to d3.js and Javascript and currently trying to build a graph using d3. My data is placed in a dataArray var currently but I want to extealise it. Every time I try use either another file or different data format it does not work. Here is my code: Resources per Project h1 { font-size: 35px; color: darkgrey; font-family: Helvetica; border-bottom-width: 3px; border-bottom-style: dashed; border-bottom-color: black; } h2 { font-size: 20px; color: black; font-family: Helvetica; text-decoration: underline; margin-left: 290px; margin-top: 0px; } Resources used per Project var width = 600 var height = 500 var emptyVar = 0 var dataArray = [0.35, 1.66, 3.04, 1.54, 3.45, 2.56, 2....
ادامه مطلبVote count: 0 I Have a Two Table Table Number one That Contain two Column First Column Student - like ( ossama - mohamed - ali) second Degrees Of student like (300 - 280 - 170) Table Number two That Contain two Column First Column Schools Degrees like ( 280 - 250 - 160 ) Second Column Schools Name like ( Alx - Canada - USA ) I want The equation that when some one like ossama enter to web site to register and hare Score 300 opining for you all schools . and Ali when he enter to the web site and hare score 170 opining only schools with 170 degrees i am using visual studio 2012 with access 2010 I Cant get this Equation Thanks For All asked 1 min agoHamadaalmasry Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a solution that contains 1 project. In that project I added existing projects (class libraries) from a different file location on my computer. Now that I have added those existing projects to my solution I can add them as References to my original project in the solution. Everything works just great, except now when I try to access my web application on my azure site, I get problems. Im thinking because azure is somehow not getting my local references. Can anyone help me think this one out? What am i missing, thanks. asked 1 min agoJeremy Conterio Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I would like to know how to do tab spaces after a word. The output shown is what i currently have. However i want to do it so that even though the word thai is shorter than the word cantonese, I want the circles after them to start at the same point so it will look more organized. Below are my php codes to generate the language which could be 'thai', 'english' etc. and if the level of language is proficient, it will show 1 circle so on and so forth. for($a = 0; $a < $count; $a++) { $b = $languagelevel[$a][0]; echo $b; if($languagelevel[$a][1] == "Proficient") { for($i = 0; $i < 1; $i++) { echo ""; } } else if($languagelevel[$a][1] == "Good") { for($i = 0; $i < 2; $i++) { echo "...
ادامه مطلبVote count: 0 This is url of github issue Any assistance would be highly appreciated. asked 45 secs agoAshutosh Singh Let's block ads! بخوانید...
ادامه مطلبVote count: 0 How do I convert 2.0E-6 to 0.00000200 in PHP ? I try to multiply 0.00000100 by 2 and I need the exact value. asked 28 secs agoJohn Book Let's block ads! بخوانید...
ادامه مطلبVote count: 0 The Angular 2 docs provide an example for creating an attribute directive that changes the background color of an element: https://angular.io/docs/ts/latest/guide/attribute-directives.html Highlight me! import { Directive, ElementRef } from '@angular/core'; @Directive({ selector: '[myHighlight]' }) export class HighlightDirective { constructor(el: ElementRef) { el.nativeElement.style.backgroundColor = 'yellow'; } } Can I also use el.nativeElement to get the content of the element (e.g. Highlight me!), modify this and update the element? asked 49 secs agoGareth Whittaker Let's block ads! بخوانید...
ادامه مطلب