back soft

مطالب مرتبط با «not» در back soft | نویسنده: استخدام کار

scala Link promise to another one

Vote count: 0 I' m reading scala.concurrent.impl.Promise and get confused by the concept "link DefaultPromise with another". I do understand the 'prevent memory leak' part but don't know how to write an example where the current state of DefaultPromise is DefaultPromise. When DefaultPromise is first created, its state is Nil and the list grows as we keep appending flatMap to it. Under what circumstances is the branch case dp: DefaultPromise[_] => dp.asInstanceOf[DefaultPromise[S]].linkRootOf(p) in Future.flatMap get called? test("default promise linking") { //f1.getState === Nil val f1 = Future {Thread.sleep(200000); 2} //f1.getState === List(CallbackRuer1) f1.flatMap(x => Future {Thread.sle...

ادامه مطلب

HTACCESS redirect to index.php: PHP level in subfolder fix

Vote count: 0 My current HTACCESS looks like this. # Run everything else but real files through index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.(gif|jpe?g|png|css|js)$ RewriteRule ^(.*)$ index.php?p=$1 [NC,L,QSA] Great piece of code where when I type in what would be a subfolder directory, it redirects as a parameter to index.php. Works great for something http://localhost/blah (which redirects as http://localhost/index.php?p=blah), but not so great for http://localhost/blah/boink. The problem with the latter is that the redirection does work and does redirect to index.php, but for some reason, the page believes that it is at the...

ادامه مطلب

Function to safely assign an optional to a var, or assign default if nil: Could not cast value of type 'Swift.Int' to 'Swift.String'

Vote count: 0 Hey there! I'm breaking bad once again asking for help--hopefully this code + any possible answers will help the community. So I'm trying to make a method that allows me to safely assign optionals to the lhs, such as: var cool_variable = risky_optional!, without necessarily interrupting the flow of whichever scope it's in.. the point of this is to cut down on control statements, and to not crash the program immediately on a forced unwrap (which I spend much time trying to design good code that doesn't do this naturally). At first, I thought I had succeeded, because everything was working perfect... then on my fourth round of tests, I got a Could not cast value of type 'Swift.In...

ادامه مطلب

Android MapView in ListView Headeris is not calling onTouchEvent

Vote count: 0 I have a ListView where I add a Google Map MapView into the header view, below is the code on how I do that: vListViewTrips.addHeaderView(vMapHeaderView, null, false); The map is shown and works but the map does not handle any gestures when its being touched even though all gestures are anebled by: googleMap.getUiSettings().setAllGesturesEnabled(true); Based on some searches that I did I tried to extend MapView and override the public boolean dispatchTouchEvent(final MotionEvent motionEvent) but still the onTouchEvent of the MapView is never called. Here is the code: @Override public boolean dispatchTouchEvent(final MotionEvent motionEvent) { System.out.println("asfdasfdgsafd")...

ادامه مطلب

Weebly Deleted Site Error 404 page not found

Vote count: 0 My college website www.chenabgrw.edu.pk was published on weebly. I purchased a new hosting service and updated nameservers. I installed wordpress on a subdomain www.new.chenabgrw.edu.pk After designing new site I deleted my weebly site to shift subdomain new.chenabgrw.edu.pk but I am still getting a 404 error of weebly. For now I have made an html page on weebly having javascript of on page load redirect function which redirect main domain chenabgrw.edu.pk to new.chenabgrw.edu.pk asked 28 secs agoCH A ND Let's block ads!...

ادامه مطلب

ExtnJS-“Element is not clickable at point” error

Vote count: 0 When trying to click a button on ExtnJs appl I receive the error following error: org.openqa.selenium.WebDriverException: Element is not clickable at point (x, y). Other element would receive the click: .. On clicking a button,page will be loaded with a new contents. code: driver.findElement(by.xpath("//a[@id='tabNameAtnBtn']")).click(); or driver.findElement(by.xpath("//a/span/span/span[contains(text(),'Name')]")).click(); or action.moveToElement(driver.findElement(by.xpath("//a[@id='tabNameAtnBtn']"))).click().perform(); Click operation is not happening, but the object is getting identified. and then fails with displaying the error message. Please let me how to resolve this i...

ادامه مطلب

onelogin authnrequest is not generated

Vote count: 0 I am not able to see the authnreq generated on this line request.create(settings) in sso action and so the acs action is not being called. I have provided the right certificate and id in my application. So what is that I am missing which is causing the authnreq to not get generated? def get_saml_settings(url_base) settings = OneLogin::RubySaml::Settings.new url_base ||= "http://localhost:3000" # Example settings data, replace this values! # When disabled, saml validation errors will raise an exception. settings.soft = true #SP section settings.issuer = url_base + "/saml/metadata" settings.assertion_consumer_service_url = url_base + "/saml/acs" #settings.assertion_consumer_logou...

ادامه مطلب

Java Arrays,Reversing values of one array to another

Vote count: -2 public static void main(String[]args){ //this program is to print the index values of an array in reversed order using //another array int[]array1={5,6}; int[]array2= new int[2]; int i; int j=1; for(i=0;i...

ادامه مطلب

Angular google maps - Events on polygons created by drawing manager

Vote count: 0 I have been trying to implement polygons into google maps with the angular directive thing on top of it and am ruing into a couple of issues that I can't find solutions for in the docs. If I create a polygon with the ui-gmap-polygon directive then I can specify an events parameter which can link through to the controller where I can then run some javascript on click etc... However if the polygon is created by the ui-gmap-drawing-manager directive what do I hook onto? The only thing I can find in the docs is for events like "overlaycomplete" however I cant seem to get access to the actual polygon to trigger stuff on an on click event etc... Does anyone know a solution to this, I...

ادامه مطلب

UITableView loads all the cells

Vote count: 0 I have UITableView with 50 rows. TableView load all cells, including cells that are not visible on the screen. Method cellForRowAtIndexPath: called immediately for all 50 cells, although they are not visible on the screen. I have a large cell, and at one time on the screen can be seen only 2 cells. Why? asked 21 secs agouser3788086 Let's block ads!...

ادامه مطلب

RabbitMQ C++ client for old debian

Vote count: 0 I have an old Debian (Ley), on which I develop an application that should coect to RabbitMQ. I downloaded the official C++ client rabbitmq-c-0.8.0 from https://github.com/alanxz/rabbitmq-c/releases/tag/v0.8.0 , but unfortunately, I can't compile it on my old Debian: wget https://github.com/alanxz/rabbitmq-c/archive/v0.8.0.tar.gz tar zxvf v0.8.0.tar.gz autoreconf -i Result: autoreconf -i /usr/share/aclocal/libmcrypt.m4:17: waing: underquoted definition of AM_PATH_LIBMCRYPT /usr/share/aclocal/libmcrypt.m4:17: run info '(automake)Extending aclocal' /usr/share/aclocal/libmcrypt.m4:17: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal Makefile.am:6: Libtool l...

ادامه مطلب

Not able to pass logical answer received from Form to NullBoolean model

Vote count: 0 My model is like class mymodel(models.Model): param1=models.NullBooleanField(blank=False) My form is class MyForm01(forms.Form): LCHOICES=[(True, 'Yes'),(False,'No')] answer=forms.ChoiceField( label='Question', choices=LCHOICES, widget=forms.RadioSelect(), help_text='Help text') I am trying to pass the user choice to a model for saving as below, where id_number is a new number for new object creation. myobj=mymodel.objects.create( id=mymodel.objects.get(id=id_number), param1=form.cleaned_data.['answer'] ) Everything happens, including new object creation but the data passed is always True even when the original answer is negative. If I take a print of answer its coming as False...

ادامه مطلب

AWS Mobile Hub Device token APNS

Vote count: 0 Got the certificate and provisioning and the app to download. But it doesn't work because it mentions device token invalid when I checked the logs. How do I get the correct device token ? I just want to test out push notification on AWS Mobile. I read somewhere it changes everytime you run the app? Ruing iOS 9, xCode 7.3.1 asked 1 min agoMarin Let's block ads!...

ادامه مطلب

How to add actions to my notification's button?

Vote count: 0 Here is my code for notification:- public void showNotification(String Name, String Rate, int Image_Source, int PandP, int Repeat) { RemoteViews remoteview = new RemoteViews(getPackageName(), R.layout.notification_layout); PendingIntent pi = PendingIntent.getActivity(this, 0, new Intent(this, SongsListActivity.class), 0); notification = new NotificationCompat.Builder(this) .setContent(remoteview) .setPriority(2) .setTicker(NameD.getText()) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle(NameD.getText()) .setContentText(RateD.getText()) .setContentIntent(pi) .setAutoCancel(false) .setCustomBigContentView(remoteview) .build(); notification.bigContentView = remoteview; remote...

ادامه مطلب

Updating Google Calendar and Contacts from Google Ford

Vote count: 0 I'm not a programmer of mode languages, I graduated from college with a > programming degree in 1987 but got employment in computing hardware not > software. I slightly modified the following code to update my calendar from a google > form. The code works great but now I'd like to add the email address and > name to Google contacts if it doesn't exist, can anyone help please? //Load the Moment.js library once. var moment = Moment.load(); var GLOBAL = { //the id of the form we will use to create calendar events formId : "19qtJNTy-ja7QBc54lZqTDQDX-sD4vg-not compleate", //the id of the calendar we will create events on calendarId : "myname@gmail.com", //a mapping of form item titl...

ادامه مطلب

Why are photos arranging in column rather than grid (HTML + CSS)?

Vote count: 0 Okay, so I'm following a Treehouse tutorial on making a simple portfolio website. They have photos that should be arranged in a grid. I'm using videos instead, but I tried switching for pictures, which made no difference. My Photos are all still in a column on the left, then the footer is to the right where some of the photos should be. I would imagine I'm missing some kind of closing tag or something, but I can't find it. Would you mind taking a look at it? Thanks. HTML: Carter Goff | Portfolio...

ادامه مطلب

Data not getting printed in excel sheet after using formula

Vote count: 0 I am trying to use XSSFRow to use data from one sheet to other,here is the code XSSFRow r = nftSheet.getRow(i); Cell c = r.createCell(7); c.setCellFormula("'Original'!F"+(i+1)+"+'Original'!G"+(i+1)+"*-1"); After computing the formula the data in the written sheet will be displaced like "#value" instead of the number. what should i do to so that original data is displayed instead of the "#value" asked 41 secs agoAnand Biradar Let's block ads!...

ادامه مطلب

SharedPreferences not working when trying to update TextView

Vote count: 0 I'm trying to change a TextView and I want it to be permanent, so I'm using SharedPreferences. Sadly, something is wrong, because the TextView doesn't update. MainService: private void updateUI(Intent intent) { String counter = intent.getStringExtra("counter"); TextView txtCounter = (TextView) findViewById(R.id.txtCounter); assert txtCounter != null; SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); SharedPreferences.Editor editor = preferences.edit(); editor.putString(String.valueOf(txtCounter), counter); editor.commit(); } asked 47 secs agoVlad Pintea Let's block ads!...

ادامه مطلب

Copy content of HTM file into clipboard [AutoHotKey]

Vote count: 0 I have a textual htm file saved locally on my machine and I would like to copy the content of it into Clipboard using an AutoHotKey script. I tried: FileRead, Clipboard, *c C:Users%A_Useame%AppDataLocalTempfile.htm and UrlDownloadToFile, C:Users%A_Useame%AppDataLocalTempfile.htm, NewTextFile.txt But neither of them worked. The only workaround I could think of, was to open the htm file in browser using: Run, C:Users%A_Useame%AppDataLocalTempfile.htm and Ctrl+A and next Ctrl+C but that's not ideal. asked 34 secs agoBababarghi Let's block ads!...

ادامه مطلب

How restrict creation of objects of one class to instances of another in Python?

Vote count: 0 I have encountered a conundrum. I think I should know how to solve this — I even wrote a Python book — but I can't figure it out. It seems like what I am struggling with should be addressed by a design patte that is a variation on the factory theme, but I can't recall one. (At the end of this writeup I suggest a technical solution, but it seems an implausible one.) I hope you find this discussion interesting in its own right, but I look forward to hearing some suggestions for solutions to my problem. Given classes, A, B, C, and D, I want to limit creation of B instances to methods of A, C instances to methods of B, and D instances to methods of C — in other words A instances ar...

ادامه مطلب