2018-10-22         Oscar

iOS - letting another app edit and save files my app created, in the same folder where the file was opened from

I would like to know if it is possible to let another iOS app open a file my app has created and then the other app edits and saves it just in the original location where my app had saved it at creation time. Or, instead, are files opened with the NSUrl in UIApplicationLaunchOptionsURLKey just read-only so they just can be saved in the other app sandbox? You can't edit other apps sandbox, it's private to your own app (except for the Documents folder, that a user can access from iTunes).You also don't have access to the file system of the phone.Welcome to iOS :) [XXX]T...

 ios                     2 answers                     57 view
 2018-10-22         Oscar

DateTimeParseException for DateTimeFormatter with pattern "yyyy[-MM[-d[ HH[:mm[:ss[.SSS]]]]]"

I would like to create a DateTimeFormatter that accepts different types of formats like: "2018", "2018-01-02" or "2018-01-02 10:15". I tried to build it like this:DateTimeFormatter f1 = new DateTimeFormatterBuilder() .appendPattern("yyyy[-MM[-d[ HH[:mm[:ss[.SSS]]]]]") .parseDefaulting(ChronoField.MINUTE_OF_HOUR, 0) .parseDefaulting(ChronoField.HOUR_OF_DAY, 0) .parseDefaulting(ChronoField.DAY_OF_MONTH, 1) .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1) .toFormatter();LocalDateTime.parse("2018-01", f1); // no pr...

 java                     1 answers                     98 view
 2018-10-22         Oscar

animate number change

i want to build a component that will be able to show a integer number max 5 digits in the style of the old analog car counters and animate the digit change. that looks something like this maybe...i have tried searching for this kinda of examples but i couldn't find anything so far. in your opinion what is the best approach to achieve this?i looked at the iphone alarm time picker and as far as i can tell there is only a fixed background and they push the numbers in or out the view. but how do i place the digits in this case and reference them to a particular value?tnx. Y...

 android                     1 answers                     73 view
 2018-10-22         Oscar

django extend query condition `COLLATION`

django==1.11.9mysql version 5.6.38+----------------------+-----------------+| Variable_name | Value |+----------------------+-----------------+| collation_connection | utf8_general_ci || collation_database | utf8_general_ci || collation_server | utf8_general_ci |+----------------------+-----------------+I have an accent field in my data, and I set the unique field. However, multiple results will appear in the query. Although I know you can by ALTER TABLE test DEFAULT COLLATE utf8_bin; set the table properties. But I think the better way is through the...

 mysql                     1 answers                     24 view
 2018-10-22         Oscar

which consensus algorithm is synchronous in nature?

There are different consensus algorithm, which are used in permission-oriented blockchain, such asPAXOS RAFT Byzantine General ModelWhich of the consensus algorithms are synchronous and asynchronous and why ? Please explain in detail.Thanks *I am not an expert on distributed systems still i will try to answer your question.In distributed systems, People use an underlying model that assumes some properties about time (“how long will it take for this message to arrive?”) and some properties about the types of faults (“how can nodes in the protocol do the wrong thing?”). Th...

 algorithm                     1 answers                     71 view
 2018-10-22         Oscar

apscheduler: how to end scheduler after task completed

print('hi apscheduler')def job_task(): print("Hello ...{}".format(datetime.now()))sched = BlockingScheduler()print("adding new job:")job_id = sched.add_job(job_task, 'interval', minutes=1, start_date='2018-08-30 16:16:00', end_date='2018-08-30 16:18:00', id='my_job_id')print("added new job to scheduler")print(job_id)res = sched.start()print(res)print(sched.job_ids())sched.remove_job('my_job_id')print("my_job_id job removed")sched.shutdown()print(" shutng down the scheduler:")wanted to end the scheduler once the task is completed, but scheduler keeps...

 python                     1 answers                     66 view
 2018-10-22         Oscar

How to implement SmartLifecycleRoleController in Spring Integration application

I am writing client-server application on base of int-ip:tcp endpoints. Code written in Kotlin.Application contains two tcp clienst which should make connection to server in sertain sequence,one after each other, when first cleint already establised connection to server and made some initialisation.As a solution for this synchronisation I suppose to use a SmartLifecycleRoleController to start group of endpoints of a dependent tcp client.To that end in depended (second) client I add role="rcCluster" and auto-startup="false" attributes to tcp-outbound-channel-adapter and tcp-...

 spring                     1 answers                     33 view
 2018-10-22         Oscar

how to set the listview format as picture below? I can show all the data in database, But It is not what i want

Do y'all know how to make those Information in the one box instead of like picture below? Sorry about that I don't know how to express myself. What I mean is make " 1, A0010001 , 16/08/2018 ,John,100,Donation,16/08/2018" In One box, and the Id starts with "2" should be in other box... I'm wondering wow to do it? Is there any way to do? I shared an example in the post below. Please refer there, Thanks in advance.Here is my Codeif(data.getCount() == 0){ Toast.makeText(Summary_Page.this,"No database",Toast.LENGTH_SHORT).show(); }else{ while(data.m...

 android                     1 answers                     66 view
 2018-10-22         Oscar

differences between INSERT select and insert into select?

I often see two styles, INSERT select and insert into select, what are the differences? Are they the same?I am using SQL Server 2008 Enterprise.Here are two samples.INSERT california_authors (au_id, au_lname, au_fname)SELECT au_id, au_lname, au_fnameFROM authorsWHERE State = 'CA'http://www.sqlteam.com/article/using-select-to-insert-recordsINSERT INTO Store_Information (store_name, Sales, Date)SELECT store_name, Sales, DateFROM Sales_Informationhttp://www.1keydata.com/sql/sqlinsert.htmlthanks in advance,George In SQL Server and MySQL, INTO is pure syntax sugar.No differe...

 sql                     4 answers                     68 view
 2018-10-22         Oscar

Bulk Copying and Deleting in OneTransaction

In C# application I like to copy the table data from one server(SQLServer2000) to another server (SQLServer2005). I like to copy the data in single instance and delete the existing data in the SQL Server 2000 table. I need to do all this(Bulk copying and Deleting) in single transaction. How to achieve this?Note: I am having two different sql server connections how to achieve this for single transaction To minimise the duration of the transaction, I always do this by bulk-copying to a staging table (same schema, but different name - no indexes etc), and then once all the ...

 c#                     3 answers                     93 view
 2018-10-22         Oscar

return different results in different lines

I found similar questions but I tried them and I did not get it to work.I got "ventas" collection and inside the collection I have fours diferents xml files.These are the xml files:productos.xml<productos><product categoria="A" pvp="20"> <codigo>A2015</codigo> <nombre>Cuchillas</nombre> <stock>100</stock></product><product categoria="A" pvp="5"> <codigo>A2005</codigo> <nombre>Laminas</nombre> <stock>57</stock></product><product categoria="B" pvp="15"&g...

 xquery                     1 answers                     30 view
 2018-10-22         Oscar

Android O : PHONE_STATE broadcast limitation

I have been trying to do something similar to truecaller app, where my app is supposed to show a screen after a call gets hung up. Was achieving this by registering android.intent.action.PHONE_STATE implicit broadcast in the manifest file. But it is not working if I change the app to target Android O, because of the Android O broadcast limitation, and I'm trying to figure out an alternative solution to this use case. Alternative solutions suggested in android docs: Job scheduler or register a service with context.Job scheduler: Because of the Job scheduler optimizations the...

 android                     6 answers                     34 view
 2018-10-22         Oscar

Google Ads Malware

Google ads did a scan of my WordPress site running in the Stockholm template and found the following malware - http://www.7lpp.org/jquery.jsWhere do I find and disable/remove this? depends.... is this a file which is needed in wordpress your templates or your plugins? if not, rename the file, check if everything is still working (everything !!!!) and then use the delete button. If the file is needed, try to find the resource needing this file(probably the functionality which is not working anymore) and download the resource again to your pc. then exchange the file with t...

 jquery                     1 answers                     19 view
 2018-10-22         Oscar

Consume events from EventHub In Azure Databricks using pySpark

I could see spark connectors & guidelines for consuming events from Event Hub using Scala in Azure Databricks.But, How can we consume events in event Hub from azure databricks using pySpark? any suggestions/documentation details would help. thanks Below is the snippet for reading events from event hub from pyspark on azure data-bricks.// With an entity path val with = "Endpoint=sb://SAMPLE;SharedAccessKeyName=KEY_NAME;SharedAccessKey=KEY;EntityPath=EVENTHUB_NAME"# Source with default settingsconnectionString = "Valid EventHubs connection string."ehConf = { 'eventh...

 azure                     1 answers                     33 view
 2018-10-22         Oscar

How to know if the user update/installed the app?

I have a question...can I know if the user updated or installed the app? I'm trying to send to the server the new device token every time the user is updating or installing again the app. If theres a way where would you recommend to add it?(in app.js?)Thank you You can use the react-native-device-info package to get the current application version.import DeviceInfo from 'react-native-device-info';const version = DeviceInfo.getVersion();// iOS: "1.0" here 1.0 is your current application version.// Android: "1.0"react-native-device-infoYou can call this in your app.js. S...

 react-native                     1 answers                     22 view
 2018-10-22         Oscar

How to crop the screenshot please?

Hello i have a code to take a screenshot then share it and its work very wellBut i want to crop this screenshot from the both top and bottom .I hope to help me because i am new in coding .This is the code that i use it :share.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Bitmap bitmap = takeScreenshot(); saveBitmap(bitmap); shareIt(); } public Bitmap takeScreenshot() { View rootView = findViewById(android.R.id.content).getRootView(); rootView.setDrawingCacheEnabled(true); return ...

 android                     1 answers                     86 view

Page 1 of 145  |  Show More Pages:  Top Prev Next Last