How to pass a variable inside a component in react
◷
تاریخ انتشار: 1395/3/14 | ساعت: 12:49
Vote count: 0 I have the following component: const Rec = React.createClass({ renderText() { if (hidden) { req_link = <Link to={`/rec/edit`} style={st}>Request link</Link> } else { request_link = null } retu ( <div> {request_link} </div> ); }, fields() { .... if (fieldID == "hidden") { var hidden = ...
How do I deserialize this XML back into an array of Point objects
◷
تاریخ انتشار: 1395/3/14 | ساعت: 12:49
Vote count: 0 The XML file is as follows <?xml version="1.0" encoding="utf-8" ?> <Polygons> <Polygon> <Points> <Point2D X="0" Y="0" /> <Point2D X="100" Y="0" /> <Point2D X="100" Y="200" /> <Point2D X="0" Y="200" /> </Points> </Polygon> <Polygon> <Points> <Point2D X="0" Y="0" /> <Point2D X="100" Y="0...
In C++, is it allowed to cast a function pointer to one that gets as a parameter a pointer to a base or derived class?
◷
تاریخ انتشار: 1395/3/14 | ساعت: 12:49
Vote count: 0 Will the following work as expected?: struct A {}; struct B: public A { int x; }; void f( B* o ) { std::cout << o->x << std::endl; } int main () { B b; b.x = 5; reinterpret_cast<void(*)(A*)>(f)( &b ); } asked 1 min agoYaron Cohen-Tal Let's block ads! (Why?)
How do I prevent sliced images in the CSS background from sitting on each other?
◷
تاریخ انتشار: 1395/3/14 | ساعت: 11:47
Vote count: 0 I have a background image I have sliced in Photoshop and set in a CSS class called".bd-image". I reference this class in the body element because I want it to be the background image for the whole page. I want each image to be 100% and not repeat. The problem is the images are on top o...
Does not play mp3 file using AVAudioPlayer
◷
تاریخ انتشار: 1395/3/14 | ساعت: 11:47
Vote count: 0 I want to play song using AVAudioPlayer. But this is does not work some time. I did not get what is the issue. I'm using this below code to play mp3 file from local. NSString *soundFile; soundFile = [[NSBundle mainBundle] pathForResource:@"notification_sound" ofType:@"mp3"]; NSURL *fil...
How to find element id based on data-index attributes
◷
تاریخ انتشار: 1395/3/14 | ساعت: 11:47
Vote count: 0 I am working on a project and I am having problem on finding element id based on the custom attributes (data-index). Plz someone help me... HTML CODE: <div id="2" data-index="1" style="width: 500px; left: -500px; transition-duration: 0ms; transform: translate(500px, 0px) translateZ(0px...
How to convert JsonNode to Date using Java 8 function
◷
تاریخ انتشار: 1395/3/14 | ساعت: 10:34
Vote count: 0 Having a common interface with a method signature as below. Function for long it is implemented as below Function<JsonNode, Long> getMapping () { retu JsonNode::longValue; } How this can be implemented for JsnonNode to Date .There is no direct api to get Date from JsonNode Function<Jso...
AutoFixture + NSubstitute throws NotASubstituteException for injected auto mock
◷
تاریخ انتشار: 1395/3/14 | ساعت: 10:34
Vote count: 0 I'm receiving the following Exception: NSubstitute.Exceptions.NotASubstituteException: NSubstitute extension methods like .Received() can only be called on objects created using Substitute.For() and related methods. ...when calling chargeService.When(): public class WhenUserTopsUpAndSt...
Image adjust on UIImageView like FB cover photo
◷
تاریخ انتشار: 1395/3/14 | ساعت: 10:34
Vote count: 0 I want to user register with cover photo. But when i set image on cover photo it will stretch. So i want to cover photo like facebook. User can adjust with scroll and not stretch image. Please help me asked 1 min agoKamlesh Shingarakhiya Let's block ads! (Why?)
How to fix an error when up uploading to apple store
◷
تاریخ انتشار: 1395/3/14 | ساعت: 9:01
Vote count: 0 I am getting the error message below when I try to upload an app to the Apple store using Xcode. The error message does not make sense to me because I am not using the assets catalog method of generating the launch screen (which is deprecated) but using the recommended approach of usin...
Why is Android Studio designer displaying my custom view nested inside itself, while it isn't
◷
تاریخ انتشار: 1395/3/14 | ساعت: 9:01
Vote count: 0 I've got a custom view for my app named AvatarView: <?xml version="1.0" encoding="utf-8"?> <com.ulouder.views.AdvancedRelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_gravity="cent...
Why no execute the imprimirMensaje method with one click on commandLink?
◷
تاریخ انتشار: 1395/3/14 | ساعت: 9:01
Vote count: 0 My problem is the program output is empty, is not Se ha impreso el mensaje when I press a link of the Formularios table My JSF page: <b:dataTable value = "#{formBean.formularios}" var = "formulario" id = "dataTableFormularios"> <b:column> <f:facet name = "header"> <h:outputText value =...
not work google traslate api c#
◷
تاریخ انتشار: 1395/3/14 | ساعت: 7:43
Vote count: 0 I 'm currently working on an application translate.I use google translate API v2 and C # . I create a project, I tu ed on my api.but the problem is that instead of having the translation I receive only the word data.can you help me, here is my code. public string Translate (string sour...
How do I persist data in memory with .net rest api
◷
تاریخ انتشار: 1395/3/14 | ساعت: 7:43
Vote count: 0 I am new to C# rest API, I have a collection of data that is created when the user POST data into my REST api, What is the best way to keep this data in memory ? The data is stored in a c# collection. I do not have a database to store this day, it must stay in memory for the life of th...
How do I load sequential images until one doens't exist?
◷
تاریخ انتشار: 1395/3/14 | ساعت: 7:43
Vote count: 0 I have a number of images in several directories, and I want to be able to load all of the images in a specific directory. E.g., directory-1 | ---- panel-1.png | |- panel-2.png | |- panel-3.png | directory-2 | ---- panel-1.png |- panel-2.png I have a number of these directories, and th...
binned scatter plots with aggregate value of each bin
◷
تاریخ انتشار: 1395/3/14 | ساعت: 6:40
Vote count: 0 I have a set of (x,y) values. Sort the data by x values. I need to bin the data into equally sized 10 bins. For each bin, I need to show a box plot which shows the distribution of y values in that bin. In another plot, for each bin, I need to show the average y value as a scatter plot....
convert pdf to docx/doc in javascript on client side only?
◷
تاریخ انتشار: 1395/3/14 | ساعت: 6:40
Vote count: 0 Is it possible to convert a pdf file to a docx/doc file in javascript client side only? I have not found any way to do it in javascript so far. asked 51 secs agoAK0101 Let's block ads! (Why?)
Efficiently storing and retrieving likes
◷
تاریخ انتشار: 1395/3/14 | ساعت: 6:39
Vote count: 0 In my Firebase database I have posts and then authenticated users can "like" posts. How can I efficiently get the number of likes a post has received. I know using MongoDB I can add/remove the user's id to a list and then use a MongoDB function to get the length of it very quickly and ...
Redhat Satellite : Clients requiring reboot
◷
تاریخ انتشار: 1395/3/14 | ساعت: 5:38
Vote count: 0 I have a Spacewalk redhat package management server (based on Redhat Satellite 5.6 ) and when I join clients to it, some of them show up in the UI as requiring reboot. Is this requiring reboot information stored in a file somewhere in directory tree? Please let me know. Thanks, K asked...
save the session using JSOUP to parse html Android
◷
تاریخ انتشار: 1395/3/14 | ساعت: 5:38
Vote count: 0 I need to parse and store data from this 2 tables in this link, after using "Inspect element" the network show me the request of tables : Request 1 to get the top table : request1 Request 2 to get the bottom table : request2 What I did: I send a get request to a link I store cookie and...