back soft

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

Using otf type fonts in Android studio

Vote count: 1 I see a lot of references for ttf fonts in Android studio but none describe usage of otf type fonts. Is there a way to use otf type fonts as well for Android studio projects? asked 6 mins agoGanga 1 Answer Vote count: 0 TTF is always been supported. OTF was later added at least in 1.6 and later, but partially. Some TTF fonts Android doesn't like. Typeface face; face = Typeface.createFromAsset(getAssets(), "font.otf"); textview.setTypeface(face); answered 2 mins agoahmad aghazadeh Let's block ads! بخوانید...

ادامه مطلب

Mapbox-GL why not using AGG for map rendeing?

Vote count: 1 AGG (Anti-Grain Geometry) is a High Quality Rendering Engine for C++. OpenGL ES is a royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems. But AGG seems more efficient than OpenGL ES in map rendeing, like Mapnik is using AGG. Q1: Mapbox-GL why not use AGG but use OpenGL? Q2: What's the difference between AGG and OpenGL ES? Thanks! :) asked 10 mins agokevin4z Let's block ads! بخوانید...

ادامه مطلب

Using Google Scripts, inside of a "for" loop and an "if" statement, I want to save the index of the values to be used later on

Vote count: 0 n00b coder here, 0 professional or school training, so have mercy. I'm trying to create two spreadsheets: one tracks student attendance at school, the other tracks their attendance at Track practice. The goal is to write a function, that I can set up as a button, that I can click that will automatically send emails to several people if the student is present at school but is absent for sports without getting excused. Right now, the whole thing is working pretty well, but I have one issue. I have a column that will read "Good" or "Bad" depending on whether the student meets the above condition. The function tus these into an array. I would like to use the index of the "Bad"'s to...

ادامه مطلب

Modofying a file at a certain position without using the temp file trick and in-memory data keeping

Vote count: 0 The reason why I decided to asks this question is that I've been recently working on a data mining project where I have massive raw data files in plain text format and by the word massive I really mean the size of the files are so big that you can't simply browse them using any text editor. Sometimes I encounter a badly formatted row somewhere in those file, and let's say I waa remove it. Unquestionably, that would be impossible to keep all the records in the memory, and using simply a StreamReader to read the blocks, and copying the line to another file over a StreamWriter is very inefficient. The problem is that, in data mining, raw files are normally preserved in plain text ...

ادامه مطلب

What is the alternative to using a for loop for objects ( not arrays ) and why?

Vote count: 0 This is not a dup of JSlint: unexpected 'for' , please do not mark it as such: There is no native for loop for looping through an object or object literal ( I know there is a .forEach for arrays ). Why does jslint suggest not using for loops? How do you loop through an object that does not have Array.forEach() or Array.some() or similar? But the bigger more important question, is why is this suggestion made? Obviously I could use Object.keys() and then forEach() but this seems like a longer way to do it. Originating Code // on a truthy match retus true and breaks from loop Pub.someKey = function (obj, func, con) { var key; if (!Pub.isFunction(func)) { retu false; } for (key in ...

ادامه مطلب

can I print latency of each request made and optionally its return status code using wrk tool

Vote count: 0 While wrk is giving me excellent stats in terms of percentile, I want to see where the latency spikes are occurring as std.dev. is quite high (~70%). I suspect it is probably when new apache process is spawned the spike is occurring asked 1 min agoshreyas Let's block ads! بخوانید...

ادامه مطلب

How to open Sqlite databse and run queries using .bat file directly?

Vote count: 0 I’ve been given a project on following requirement. I would like to know if any shortcut applicable trick is there to open a SQlite database and execute SQL queries using .bat file. If it’s there it would be much helpful to me. My database path I’ve kept as under: C:UsersbhattyDesktop Database name: content.sqlite Query to be updated: update attribute set att_final=0 where att_id like 1 asked 48 secs agoYogin Bhatt Let's block ads! بخوانید...

ادامه مطلب

Using OR in linq expression conditionally

Vote count: 0 I have fliters in my asp.net project and want to add expression to this list with condition: Expression func; var list = new List(); I want to use "OR" condition between elements of list. for example: if(sth){ func = p => p.a...

ادامه مطلب

Fetching user data using Facebook Android SDK

Vote count: 0 I want to fetch user data from Facebook using my app. I've written the code and it logs in the user but fails to fetch user data. Here's the code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AccessToken accessToken = AccessToken.getCurrentAccessToken(); callbackManager = CallbackManager.Factory.create(); if (PrefUtils.getCurrentUser(getActivity()) != null) { //dont ask for login Intent homeIntent = new Intent(getActivity(), MainActivity.class); startActivity(homeIntent); Toast.makeText(getActivity(), "Intent", Toast.LENGTH_SHORT).show(); //getActivity().finish(); } mCallBack = new FacebookCallback() { @Override public void onSuccess(Log...

ادامه مطلب

Google plus and facebook login using asp.net

Vote count: 0 I am working on asp.net application where i am using facebook and google plus login with c sharp code. Everything working fine for both social platforms. I am using the following code: CS: GoogleProfile profile = new GoogleProfile(); FaceBookUser faceBookUser = new FaceBookUser(); protected void Page_Load(object sender, EventArgs e) { try { //Google plus GoogleCoect.ClientId = ConfigurationManager.AppSettings["GoogleClientId"].ToString(); GoogleCoect.ClientSecret = ConfigurationManager.AppSettings["GoogleClientSecret"].ToString(); //Facebook FaceBookCoect.API_Key = ConfigurationManager.AppSettings["FacebookAPIKey"].ToString(); FaceBookCoect.API_Secret = ConfigurationManager.App...

ادامه مطلب

weird result when using both slice indexing and boolean indexing on a 3d array

Vote count: 0 I encountered a quite weird problem when indexing a numpy ndarray. You can produce the result with following code. I don't understand why the result of indexing a is somehow transposed while the result of 2d array b is normal. Thanks. In [1]: a = np.array(range(6)).reshape((1,2,3)) In [2]: mask = np.array([True, True, True]) In [3]: a Out[3]: array([[[0, 1, 2], [3, 4, 5]]]) In [4]: a[0, :, mask] Out[4]: array([[0, 3], [1, 4], [2, 5]]) In [5]: a[0, :, mask].shape Out[5]: (3, 2) In [6]: b = np.array(range(6)).reshape((2,3)) In [7]: b[:, mask].shape Out[7]: (2, 3) asked 2 mins agoTexot Let's block ads! بخوانید...

ادامه مطلب

Using bash shell on RHEL 7 - why does find find more files when I don't use -exec?

Vote count: 0 I'm looking for all setuid/setgid files. When I don't use -exec, it works as expected: # find /usr/bin -type f -perm -4000 -o -perm -2000 /usr/bin/wall /usr/bin/ksu /usr/bin/chage /usr/bin/chfn /usr/bin/chsh /usr/bin/fusermount /usr/bin/passwd /usr/bin/write /usr/bin/su /usr/bin/umount /usr/bin/gpasswd /usr/bin/newgrp /usr/bin/mount /usr/bin/pkexec /usr/bin/crontab /usr/bin/cgclassify /usr/bin/cgexec /usr/bin/ssh-agent /usr/bin/Xorg /usr/bin/at /usr/bin/sudo /usr/bin/locate /usr/bin/staprun When I use -exec, I only get a subset of the results back: # find /usr/bin -type f -perm -4000 -o -perm -2000 -exec ls -l {} ; -r-xr-sr-x. 1 root tty 15344 Jan 27 2014 /usr/bin/wall -rwxr-sr...

ادامه مطلب

Example for using Asynctask in NavigationDrawer that uses RecyclerView for listing menu items

Vote count: -1 I am looking for a good example for using Asynctask in NavigationDrawer that uses RecyclerView for listing menu items asked 2 mins agonme Let's block ads! بخوانید...

ادامه مطلب

Using the Join command to eliminate extra paragraph breaks

Vote count: 0 So I have this text: ' Location Address Number Website ' Except the top and bottom lines are empty as well, there aren't single quotes on those two lines. I basically want to make sure each line is one after another without any line breaks. This is what I would like it to look like. Location Address Number Website I want to strip all of the line breaks and just have each result one line after another. This is the code to scrape the information from a webpage. results = soup.findAll('div', class_='name') for each in results: worksheet.write(row,1,each.text) row += 1 Each time I run through this, I want the results to print one line after another. Thanks. asked 4 mins agoWes Let'...

ادامه مطلب

WordPress - Accessing custom PHP file and Creating Session using Ajax

Vote count: 0 I have been recently working on WordPress and trying to create sessions however I'm facing the following issue: I have created my own PHP file, where I will get the POST data and assign it to session variable. I have created the following function in Theme Footer file: if(document.getElementById("size")) { var sizeSelect = document.getElementById("size"); sizeSelect.addEventListener("change", function(){ var size=document.getElementById("size").value; if(size=="Custom Size") { document.getElementById("measurementChart").style.display = "block"; } else { clearCookies(); } }); } function closeMeasurementWindow() { document.getElementById("measurementChart").style.display = "none"...

ادامه مطلب

Undefined index in php when using ajax

Vote count: 0 function val() { var name=document.getElementById("name").value; if(name == '') { alert(name+" is empty"); } else { var dataString = "name = "+name; $.ajax({ type:"POST", url:"hi.php", data:dataString, cache:false, success:function(html){ $('#msg').html(html); } }); } retu false; } Here is my hi.php file When clicking on submit button it show an error Notice: Undefined index: name in C:wampwwwSendEmailAjaxJqueryhi.php on line 2 I don't know where is the error plz help me to find out the error... Thanks in advance asked 40 secs agoDevraj Let's block ads! بخوانید...

ادامه مطلب

my kivy simple hello world app is not closing I'm using raspberry pi B and I can't close it I must unplug my raspberry pi 5v adapter to close it

Vote count: 0 I'm using rasbian jessie this is the very simple code import kivy from kivy.app import App from kivy.uix.label import Label class mamdouh(App): def build(self): retu Label(text='mamdouh') if __name__=='__main__': mamdouh().run() asked 1 min agomamdouh abdelfatah Let's block ads! بخوانید...

ادامه مطلب

In SQL server what is the difference between using = and join?

Vote count: 0 We have been leaing SQL Server programming in Database Systems class. The professor goes exceptionally fast and is not very open to asking questions. I did ask him this, but he just advised me to review the code he'd given (which doesn't actually answer the question). When making a query, what is the difference between using the term JOIN and using the "=" operator? For example, I have the following query: SELECT VENDOR_NAME, ITEM_NAME, QTY FROM VENDOR, VENDOR_ORDER, INVENTORY WHERE VENDOR.VENDOR_ID = VENDOR_ORDER.VENDOR_ID AND VENDOR_ORDER.INV_ID = INVENTORY.INV_ID ORDER BY VENDOR_NAME In class the professor has used the following code: SELECT DISTINCT CUS_CODE, CUS_LNAME, CUS...

ادامه مطلب

Using restTemplate and jackson for parsing a list inside an object

Vote count: 0 I have writte a restTtemplate class for an API. The response looks like: { "a":"A", "b":"B", "myList": [ {}, {}, {}]} I just need "myList" array and I want to map it to a List. What is the easiest way to do this usin Spring RestTemplate and Jackson ObjectMapper? asked 1 min agoGovan Let's block ads! بخوانید...

ادامه مطلب

How to get creation time of indices in elastic search using Jest

Vote count: 0 I am trying to delete the indexes from elasticsearch which are created 24 hours before. I am not finding a way to get the creation time of indices for the particular node. Using spring boot elastic search it can be accomplished. But I am using Jest API. asked 4 mins agostella Let's block ads! بخوانید...

ادامه مطلب