Vote count: 0 Is there any method or function in PHP which can get the current DateTime of specific timezone from inteet. Not the time of local system. please Guide me. asked 1 min agoHamza Hafeez Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I don't understand why my compiler won't accept code below #include #include template using M = std::unordered_set; template using D = M; template using DM = std::unordered_map < typename M::const_iterator // Problem , typename D::const_iterator >; // Problem int main(int argc, char ** argv) { D d; M m; DM dm; // Problem } The compiler command is clang++ -std=c++14 test.cpp -o test A compiler error message excerpt is /usr/bin/../lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/bits/hashtable_policy.h:85:11: error: implicit instantiation of undefined template 'std::hash' noexcept(declval()(declval()))> Why isn't it allowed to use typename M::const_iterator as key in ...
ادامه مطلبVote count: 1 I have some angle data from an animal behavior study that I would like to plot for publication using ggplot2. What follows is my current workflow with some example data and how it would look using the generic plot function. ### Create two data frames of random Cartesian coordinates ### df1...
ادامه مطلبVote count: 0 I am creating folder after checking non-existance of folder with same name. However I am unable to check for the folder using 'isdir' if folder name contains only numbers. print(os.path.isdir('D:Git_FileIAutomationdir4534565')) True print(os.path.isdir('D:Git_FileIAutomation4534565')) False Is there any alteative way to do this? asked 1 min agoTester P Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Here is the code which i used for crawling a web page. The site I want to scrape has images lazy loading enabled, so scrapy can only grab 10 out of 100 images, the rest are all placeholder.jpg for item in items: listing = Item() listing['image'] = item.css('div.product img::attr(src)').extract() listing['url'] = item.css('div.item-name a::attr(href)').extract() listings.append(listing) What would be the best way to deal with lazy loading images? Thanks! asked 1 min agoWill W Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm looking for a way to use different scales for different variables within a function. This is a follow on question from A simpler way to achieve a frequency count with mean, sum, length and sd in R Given # create the summary function summaryStatistics...
ادامه مطلبVote count: 0 I know my question is duplicated in Using jquery in google apps script, but as I caot comment, I ask again. I want to do the same but caot solve the problem. I tried all jquery versions, and the code proposed by Michelem, but nothing happens. JQUERY is not working at all. asked 1 min agoRodrigo E. Principe Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Consider that map of India geo json is selected for creating maps. If I use an identifier like "region" in joinBy option which is multi-valued i.e. many states have the same region, what would be displayed on the map? http://jsfiddle.net/amrutaJgtp/2r2nfz97/3/ In the above fiddle, I've given region as joinBy data: data, mapData: Highcharts.maps['countries/in/in-all'], joinBy: 'region', name: 'Random data', As seen in the output, the map shown is incorrect. What is the reason for this? Should the identifier used for joinBy option be unique to the mapData (1:1 relationship between mapData and data)? asked 4 mins agosgrg Let's block ads! بخوانید...
ادامه مطلب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...
ادامه مطلب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! بخوانید...
ادامه مطلب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! بخوانید...
ادامه مطلبVote count: 0 I am facing some issues while reading / writing Avro data via FlinkKafkaProducer / FlinkKafkaConsumer through Beam. May be missing something very basic stuff. Will add the code in following posts. It would be great if someone can point to working example of FlinkKafkaProducer and Consumer using Avro schema (NOT using confluent edition of kafka) A) > BeamKafkaFlinkAvroProducerTest if I use KafkaProducer directly (i.e. call produceSimpleData.. ) , things are working fine (just for testing ) Using FlinkKafkaProducer as UnboundedSource (this is what I should do) (i.e. I call produceAvroData2.. ) with the following steps ... 1) First, if I use >> AvroSerializationSchema schema = new...
ادامه مطلبVote count: 0 I am trying to coect to a host but using the ipv4 address instead of its ipv6 address. chrome.sockets.tcp.coect automatically resolves the hostname to an ipv6 address and coects with that. So I thought I would resolve the hostname and coect manually to the ipv4 address. But I can't find any documentation about resolving hostnames using chrome.* APIs. Anyone know? Or is there some hidden option to chrome.sockets.tcp.coect to prefer ipv4? asked 1 min agokzahel Let's block ads! بخوانید...
ادامه مطلبVote count: 1 Is there a way to extract a typedef from a template class? For example, this is what I would like to do: template class Foo{ public: typedef T(*Functor)(Args...); Foo() = default; }; template Foo make_foo(T(*f)(Args...)){ retu Foo; } int bar(int i){ retu i * 2; } using type = make_foo(bar)::Functor; I caot do this. However, I can do this: using type = Foo::Functor; This sort of defeats the purpose for me. Is there any way to wrap a function such that I can extract it in type form? asked 5 mins agoGoodies 2 Answers Vote count: 3 Would decltype be good enough? using type = decltype(make_foo(bar))::Functor; answered 3 mins agojrok Vote count: 3 Use decltype: template class Foo{ pu...
ادامه مطلبVote count: 0 I am using ibatis in my application to manage the coections to the oracle database and I am trying to update the maximum number of DB coections as these values were not modified from the time these were originally set. I have checked the database table v$session for the current number of active sessions, but this value alone will not help me reconfigure my ibatis settings. I am trying for a way print the number of active coections in use into the logs so that I can parse them to get the usage statistics of my application and then update my configurations. asked 1 min agoRahul Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a flex-box with an undefined number of cards inside it. .box { display: flex; flex-wrap: wrap; } .card { flex: 1 210px } I must decide how many cards put inside my box, the number of cards displayed will be the right amount to fill exactly two rows. ===== is a card --------------------- | ===== ===== ===== | | ===== ===== ===== | --------------------- This means, that, with a .box of 630px, I will display 6 cards. (630 / 210) * 2 = 6 To compute the cards number per row I'm using this code: getCardsPerRow() { let listWidth = box.clientWidth let cardsNumber = Math.floor(listWidth / 210) let cardWidth = Math.floor(listWidth / cardsNumber + listWidth % cardsNumber) retu Math...
ادامه مطلبVote count: 0 I have used Rscript ruer but its not working. public static string SetupPath(string Rversion = "R-3.2.3") { var oldPath = System.Environment.GetEnvironmentVariable("PATH"); var rPath = System.Environment.Is64BitProcess ? string.Format(@"C:Program FilesRR-3.2.3binx64", Rversion) : string.Format(@"C:Program FilesRR-3.2.3bini386", Rversion); if (!Directory.Exists(rPath)) throw new DirectoryNotFoundException( string.Format(" R.dll not found in : {0}", rPath)); var newPath = string.Format("{0}{1}{2}", rPath, System.IO.Path.PathSeparator, oldPath); System.Environment.SetEnvironmentVariable("PATH", newPath); retu newPath.ToString() ; } This button_clcick method calls the rscript ruer....
ادامه مطلبVote count: 0 Based from my research, Gmail and other email clients doesn't support media queries so I can't do simple conditional show and hide of a container. I have 2 designs. One is for the desktop email signature and the other one is for mobile devices. Are there any other ways on how to implement responsive HTML email signatures in Gmail browser/mobile app? Thanks. asked 2 mins agomarknt15 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am using flexcode sdk. The problem is that, I would like to know when i put pictureBox1.Dispose (), the picturebox becomes invisible. Is there any ways which I could allow the picturebox stays with is being Dispose. The reasons i dispose is because i am using fingerprint in two seperaate form. Therefore, i have to dispose the fingerprint in the first form to take in second form. Is it possible not disposing it while allow taking fingerprint verification in second form? asked 2 mins agoProgrammer Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm trying to develop a java program that uses c++ code. For this purpose, I'm using a 32-bit mingw and a 32-bits jre (version 1.8.0_77). I have problems trying to load the *.dll. (I haven't tried to run any method yet) This is the class where I have declared the native method: public class JniImports { static{ System.loadLibrary("hello"); } public int test(int n){ retu testJava(n); } private native int testJava(int n); } And this is the Main method: public class Main { public static void main(String[] args) { JniImports a = new JniImports(); } } The c-header file has been generated by the javah tool, so I'm sure that's ok. Anyway, as I have said, I have not tried to execute an...
ادامه مطلب