Vote count: 0 I have some shared code(java) and translate it by j2objc, and I create an static library(xcode) as the following settings. GENERATED_FILES_DIR = ${SRCROOT}/Generated; HEADER_SEARCH_PATHS = $(inherited) ${J2OBJC_HOME}/include ${GENERATED_FILES_DIR} LIBRARY_SEARCH_PATHS = ${J2OBJC_HOME}/lib OTHER_LDFLAGS = -ljre_emul and build ok, generate an .a file. Then I create a single view application and link the .a library, and using the following setting: INCLUDE = "the include of .a file" HEADER_SEARCH_PATHS = $(inherited) "${J2OBJC_HOME}/include" "${GENERATED_FILES_DIR}" "${INCLUDE}"; LIBRARY_SEARCH_PATHS = $(inherited) "${J2OBJC_HOME}/lib"; OTHER_LDFLAGS = $(inherited) -l"jre_emul" -l...
ادامه مطلبVote count: 0 I am using C#. How can I display a success message if all data were submitted, or an error message and break the loop in case there was an error during the foreach loop? This is my try, but I don't know the best way to display the messages: protected void btnUpdate_Click(object sender, EventArgs e) { DataDTO data = new DataDTO(); BaseDAO coexion = new BaseDAO(); foreach (GridViewRow row in this.GridView1.Rows) { data.lblId = ((Label)row.FindControl("lblId")).Text; try { coexion.update_database(data); } catch { // Display error message and break loop } } GridView1.EditIndex = -1; LoadGrid(); // Display success message } asked 1 min agoDavidM Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I know that some questions have already been asked about this subject but it's not the theory of the boot function that constitute my problem but rather the application Admitting I want to use the mean of my sample as a statistic, I have an error when computing : b...
ادامه مطلبVote count: 0 Below is my logback.xml I have added filter class to set different log levels but it doesn't seem to work. public class APIController { private static final Logger logger = LoggerFactory.getLogger(APIController.class); ... private void handleException(Exception ex, String message) { logger.wa(message); if(logger.isInfoEnabled()){ ex.printstacktrace(); } } } But still I see stacktrace on console. How should I keep 2 different log levels asked 2 mins agouser1298426 Let's block ads! بخوانید...
ادامه مطلبVote count: 1 I am using linq to sql framework in my C# code. I would like to implement query patte for a scenario ( check if a given organisation is valid). how can this be done without using data context. I do not want to use or create a data context for the table which i want to check my scenario. asked 1 min agoV. B Chan Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Firefox 47 is supposed to support IDBKeyRange's includes method, but I'm having a hard time understanding why it's giving the results it is giving. The first value in the comments is what I'd expect, the second is what FF actually gives. // These work as I'd expect to retu false console.log(IDBKeyRange.lowerBound(2).includes(1)); console.log(IDBKeyRange.lowerBound(4).includes(3)); // These do not behave as expected (I'd expect "true") console.log(IDBKeyRange.lowerBound(1).includes(1)); // FF gives false console.log(IDBKeyRange.lowerBound(3).includes(4)); // FF gives false What am I missing here?? asked 2 mins agoBrett Zamir Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a list object containing all my data and which is split into the different levels of my factor variable. Now I want to run a regression for every factor level and estimate the individual coefficients. Finally I want to weight the individual coefficients by the number of observations of each factor level. To get reasonable standard errors for this final coefficient estimation, I want to use the boot package in R. I tried to prepare a reproducible example for you. bootdata This small data set contains 8 different factor levels. Suppose you want to regress y on x1 and x2 for every factor level and then value weight the coefficients. bootdata...
ادامه مطلبVote count: 0 i try to use linux ubuntu with a program installed on it , with virtual box on windows 10. 1. I installed Oracle VM 2.i downloaded ova file of the ubuntu(which is provided by my professor) 3. i opeed the ova file with VM. now i run the trusty fenics then i get this screen and i press enter then i get a black screen with - on it for ever. so what is the problem? asked 1 min agophysshyp Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Is it possible to us a named count function (I.E SELECT n.name, count(c.name) as freq FROM names as n, names as c WHERE freq < 1 AND gender = 'f' order by rand() ) in the where column of a query, or would i have to do this another way? asked 58 secs agoPatrick Pierson Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a problem using maven, I use a SNAPSHOT version from a inteal component on my ear project and I have the follow problem: So, I declare my poms likelike this: main pom: com.mycompany mycomponent 1.0.0-SNAPSHOT ejb project: com.mycompany mycomponent web project: com.mycompany mycomponent So after clean install my ear is generate like this: myear.ear | -- lib | |--mycomponent-1.0.0-20160601.124237-1.jar |--myejb.jar |--mywar.war |-META-INF | | -MANIFEST.MF //my classpath has the value lib/mycomponent-1.0.0-SNAPSHOT.jar |-WEB-INF |-- lib |-mycomponent-1.0.0-SNAPSHOT.jar So, why maven using the same artifact with different names? How can I force maven to use only SNAPSHOT nam...
ادامه مطلبVote count: 0 I'm aware that in MVC, the Model is the class part. If I have a User class and instantiate an object, the object must refer to a single user from the database. So I'll have the CRUD methods on the user, for that specific user. But if I need a function to run a SELECT * FROM Users, should I create a function within the User class? Or a function in a helper file? Or in the controller? Where should it go, in order to respect the MVC patte? I mean, it makes no sense to instantiate a User object just to run a function to display the Users table. I'm not sure if this will raise "primarily opinion based" flags. I just don't know where those functions should go. If you guys consider th...
ادامه مطلبVote count: 0 My log files contain file-names as well as line numbers. After a project was built and produced some logs, I want to start "make logs" or something like that, which will parse the current log-file and output in the current build-output list of my QtCreator (or any other IDE) the list of error/waing log lines. So I could navigate to the file-position with a mouse click. I used to implement it in Vim long time ago, but I hope, there are some modules out there. Are your aware of some? asked 1 min agoValentin Heinitz Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I feel like this must be a relatively common issue, but my Google-foo has thus far failed me. I have a Rails 4 app where I am using SASS for my CSS. I have a couple of gems that I am (forced) to use that primarily contain CSS. Let's say gem C has an index.css file that contains Sprockets directives for the CSS of that gem. When I @import gem-x/index my application.css file will contain simply the text of those Sprockets directives. The only solution I have been able to find is to look at the source of the exteal gems so that I can manually @import each CSS file directly, e.g. @import gem-x/file1 @import gem-x/file2 @import gem-x/file3 This is both tedious and requires me to kno...
ادامه مطلبVote count: 0 To use the vector units, e.g 512-bit wide for simultaneous operation on 8 double precision values, is it necessary to be single threaded and use AVX intrinsics ? If my program is not easy to vectorize, could i maybe get some of the benefit by launching 8 threads where each use 1 of the units ? asked 3 mins agouser1382302 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 How to create image file in android from dataURL which is generated using JavaScript data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT.......== asked 3 mins agosaikumar Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to implement an auto download functionality in browser from s3. I am currently using an anchor tag(created on the fly using javascript) using the following code var link = document.createElement("a"); link.download = name; link.href = file; if(callback) callback(); link.click(function(){ document.body.removeChild(link); }); But this approach does not work in safari because instead of downloading the file, it opens it in the browser(pdf file) and hence prevents the actual html to be rendered. I researched and found that safari does not implement the download tag of html5. Is there another way to download files in the browser. Or any s3 SDK available to do the same? asked ...
ادامه مطلبVote count: 0 Long story short, I have a web application where i have a button which triggers 2 async ajax calls. The 2 ajax calls use a parameter which is actually a javascript variable set in the application. When the two ajax calls are done, a third ajax call is performed using the result from one of the initial ajax calls. This third ajax call, when done, adds a new div in the content. So far I used CodeCeption with WebDriver, where the above functionality was easily simulated by two simple actions: $I->click(button) $I->waitForElementVisible(newdiv) I am now trying to simulate the same using PhpBrowser but I'm not certain how to approach this: Since PhpBrowser doesn't use javascript, ho...
ادامه مطلبVote count: 0 I have an Excel workbook that will query a SQL Server 2012 database using VBA. Many users will temporarily use this workbook so I created a generic ID with SQL Server credentials only. Some of the users can execute the VBA and retrieve data without a problem. When other users try, the VBA ignores the provided coection string using the generic user and password and provides their windows credentials. Why are they sending their windows credentials instead of the credentials provided in the coection string? How do I force the coection to use the provided Uid and Pwd? The error message isCoection Failed:SQL State '28000'SQL Server Error 18456...Login failed for user 'DomainUserid' ...
ادامه مطلبVote count: 0 I am using postcodes.io api to get Geolocation information based on postcodes. It's working fine. But this API has a limitation that it can accept only 100 postcodes per request. I have around 300 postcodes. I am thinking of making calls to API parallely and aggregate the response after getting everything. var httpClient = _httpClientFactory.GetHttpClient("GeolocationAPI", postCodeServiceUrl, _httpLogger); // chunks the list by 100 items and retus the collection var postcodeChunks = postcodes.ChunkBy(100); postcodeChunks.ForEach( postcodeList => { var response = httpClient .Post ( "postcodes", new MultipleGeolocationInfoRequest {Postcodes = postcodeList.ToArray()}); } ); ChunkB...
ادامه مطلبVote count: 0 Consider following code: #include template struct A { T x; A(T X) : x(X) { } static const A a; }; template const A A::a(5); template struct B : public A { B(T X) : A(X) { } static const B b; }; template const B B::b(A::a.x); int main() { //auto test0 = A::a.x; auto test1 = B::a.x; auto test2 = B::b.x; auto test3 = A::a.x; std::cout...
ادامه مطلب