id
stringlengths
5
11
text
stringlengths
0
146k
title
stringclasses
1 value
doc_40400
Expected Output N = 1 // Number of times to loop a = 1, b = 2, c = 3 // initialization a = 3, b = 1, c = 2 // After one loop This is what I have for now // ... public static void Main() { int a = int.Parse(Console.ReadLine()), b = int.Parse(Console.ReadLine()), c = int.Parse(Console.ReadLine()); } static void Mus...
doc_40401
Scenario: Parent object has IList collection (Children) var parent = _parentRepository.Get(parentId); //loads parent ..do stuff //this causes all Child objects to be loaded into memory //and then finds the subset of boy objects (not great performance) var boys = parent.Children.Where(t => t.Sex == 1); If I try expl...
doc_40402
I'm trying to have those values sorted in Jupyter notebook so that all instances where Drug_1_Dosage was 1-8 are sorted in an ascending manner for the response (there was more than 1 row with dosage 1 for example), while also doing the same for Drug_2_Dosage (but without affecting the first one). I want to sort them s...
doc_40403
EXPECTED SYSTEM BEHAVIOR: When SSN column in the txt file is not equal to 9 digits, the row that includes that column should not be inserted in the database. ACTUAL BEHAVIOR: When SSN Column is not equal to 9 digits, it still insert it into the database. Columns to be inserted: Last name, First name, MI, SSAN and Payr...
doc_40404
In the main class, I loop through every array and update the objects. The problem is that I have to hold an array for each type of object. It's comfortable to have an array for each type but it'd make the code ugly when I'll have dozens of types. I thought about having a HashMap of String|Array, and every entry would h...
doc_40405
I have the same problem depicted in that post but I'm using LinqtoExcel to read the file instead of plain queries. What would be the LinqToExcel equivalent for setting the connection string as the answer to that post suggests? Here is the code I'm using: var excelOM = new ExcelQueryFactory(pPathArchivoOM); var despach...
doc_40406
Query : SELECT * FROM( SELECT ESIDispensary,ESILocation,test,Category, COUNT(*) AS [Total Count] FROM (SELECT category,ESILOCATION,ESIDISPENSARY,TEST FROM(SELECT id,CompanyId,FName,Code,category,ESILOCATION,ESIDISPENSARY FROM dbo.[EmployeeDetail] e WHERE e.CompanyId = 1 AND Category in (1,2)) a ...
doc_40407
This is the code I’ve tried first: from playsound import playsound playsound('/Users/cairo/Desktop/i wish.mp3') /Users/cairo/PycharmProjects/pythonProject/venv/bin/python /Users/cairo/PycharmProjects/pythonProject/main.py playsound is relying on a python 2 subprocess. Please use `pip3 install PyObjC` if you want...
doc_40408
Range("A1:D1").Select Range("D1").Activate Selection.Copy Sheets("Sheet2").Select ActiveSheet.Paste Link:=True However, the code would make the sheet to switch to Sheet2 from Sheet1. Is there anyway that I could paste the link without switching the sheet? Thanks. A: This will work: ThisWorkbook.Worksheets("Sheet2").R...
doc_40409
var texture = new THREE.TextureLoader(); var texture1 = texture.load('texture1.jpg'); var texture2 = texture.load('texture2.jpg'); var texture3 = texture.load('texture3.jpg'); var texture4 = texture.load('texture4.jpg'); var texture5 = texture.load('texture5.jpg'); var texture6 = texture.load('texture6.jpg'); var geom...
doc_40410
I am trying the following, however it does not render the loaded texture (it's just black). Other textures loaded via assets are rendering just fine. Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); photoPickerIntent.setType("image/*"); this.activity.startActivityForResult(photoPickerIntent, SELECT_PH...
doc_40411
I am just wondering if this procedure is possible in cURL? and my another question is if I can use cURL inside MS Excel? A: Ended up using Sikuli scripts for web log in.
doc_40412
Id Type TimeStamp Amount Partition year Hash ------------------------------------------------------- 1 194I 108 28 Monthly 2022 abc 1 194I 105 56 Monthly 2022 abc 1 194J 106 36 Monthly 2022 abc 2 194K 110 29 Monthly ...
doc_40413
data(mtcars) # Force 2 variables to factors (if code works fine, output will have 9 rows) mtcars$vs <- as.factor(mtcars$vs) mtcars$am <- as.factor(mtcars$am) # The loop for (i in mtcars[,1:length(mtcars)]){ if(is.numeric(i)) { print(mean(i)) } } #Result (9 rows as expected) [1] 20.09062 [1] 6.1875 [1] 230.7219 [1] ...
doc_40414
As an example: enum Gender { Male, Female } class Person { int Age { get; set; } Gender Gender { get; set; } } Desired JSON result: { "Age": 35, "Gender": "Male" } Ideally looking for answer with built-in .NET framework classes, if not possible alternatives (like Json.net) are welcome. A: Use this: using Ne...
doc_40415
setup in second container to deploy helm chart. Based on some finding is that possible to setup helm client and server in first container and setup only client in second container? Thanks. A: You can install helm using the following script commands: curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm...
doc_40416
When std::function is assigned a regular function, this works as expected: #include <functional> #include <iostream> bool my_function(int x) {} using my_type = bool(*)(int); int main() { std::function f = my_function; auto pointer = f.target<my_type>(); // Prints 1 std::cout << (pointer != nullptr) <<...
doc_40417
I'm trying to figure out the best way to import the addresses into individual records. Probably just go with NameLine, Address1, Address2 for each one (3 fields that I can parse later). What can I do easily with C# or VBA? Or UltraEdit? A: If all the tabs line up in Word, you should be able to Alt-Select to select ind...
doc_40418
https://gist.github.com/naaman/1053217 but I had to use <webAppSourceDirectory> parameter to point onto the extracted war directory. Thing is that I can't compile the code, to see if the hot deployment works. Maven is saying that some resource is in use, so it can't be replaced. I'm working on IntelliJ IDE. Is there a...
doc_40419
A: Assuming your elements are comparable: List<E> res = new ArrayList<>(); Iterator<E> it1 = orderedIterables1.iterator(); Iterator<E> it2 = orderedIterables2.iterator(); if(!it1.hasNext() || !it2.hasNext()) { // is one of the iterables empty? return res; } E e1 = it1.next(); E e2 = it2.next(); while(it1.hasNext()...
doc_40420
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); distance = (EditText)findViewById(R.id.distance); hour = (EditText)findViewById(R.id.hour); minute = (EditText)findViewById(R.id.minute); second = (EditText)findViewB...
doc_40421
Car c2 = new Car(); HashMap<String,Car> hm= new HashMap<String, Car>(); hm.put("Ford",c1); hm.put("Volvo",c2); How do I iterate to get only the values(only name) to be printed? Out should be: c1 c2 Not the below : c1@13efr5t4 c2@234fvdf4 A: Step 1: First you have to override the toString() method in ...
doc_40422
syntax error at ./largefile line 11, near "/ ." Search pattern not terminated at ./largefile line 11. #!/usr/bin/perl use strict; use warnings; my $file = 'test.txt'; open my $info, $file or die "Could not open $file: $!"; while( my $line = <$info>) { do LD_LIBRARY_PATH=icu/source/lib/ ./a.out "$line" >> newt...
doc_40423
I have used <h1>, <h2>, <h3>, <h4>, <h5> and <h6>, and now I would like to add <h7> and <h8> as I have different text types that I need to use. If you cannot do this, is there a way to call upon CSS sheets for text, other than <p> and <h1> - <h6>? A: None of the answers posted so far are quite correct. Some are quite ...
doc_40424
Here is the code for auto-role when joining the server. client.on('guildMemberAdd', member => { console.log('User ' + member.user.username + 'has joined the server!') var role = member.guild.roles.find('name', 'Members'); member.addRole(role) }); And here's the whole code that I got for the bot (it's...
doc_40425
When the keyboard opens the main body of the HTML gets az appropriate margin-bottom, however, this does not apply to the dialog's wrapper (cdk-overlay-container), since it's position is fixed. My ideas: 1, Changing from fixed to absolute could solve my problem, however since my main container is a huge scroll-container...
doc_40426
This is my sample json data : { "id": 10644, "name": "CP2500", "numberOfConnectors": 2, "connectors": [ { "id": 59985, "name": "CP2500 - 1", "maxchspeed": 22.08, "connector": 1, "description": "AVAILABLE" }, { "id": 59986, "name": "CP2500 - 2", "maxchs...
doc_40427
Here is the whole program I have coded: #include <iostream> #include <fstream> using namespace std; int test_array[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int test2_array[] = {0, 1, 2, 3, 4, 5, 6, 7, 10, 9}; int size_1 = 10; int size_2 = 10; template <typename T> T* union_func(T *P1, int size1, T*P2, int size2) { T*...
doc_40428
As this is an operating system, I cannot attach tools like valgrind to it, but I can run it in emulators (bochs/qemu) with gdb attached. Is there a way in gdb to trace write access to a class instance or more general a specific memory range? I would like to break as soon as write access happens, so I can verify if this...
doc_40429
Suppose I have an string like "IAmABoy".I want the resulting strings like I Am A Boy. How to do this? Is there any sample code? Please show me the way to do this. A: What about something simple like just iterating over each character? Assuming inputString and outputString are NSStrings something like this should wor...
doc_40430
I tried to dig it and found that babel-plugin-transform-es2015-for-of transforms for-of to for (var _iterator2 = notifications[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { which fails. I also tried babel-plugin-transform-es2015-typ...
doc_40431
When I run mkdir -p "-AFolder", I am getting the following error: mkdir: unknown option -- A What's is causing the error? A: The mkdir command tries to interpret "-AFolder/" as an option as it begins with a -. Use the -- dummy argument to tell explicitly that you are not providing an option : mkdir -- -AFolder From ...
doc_40432
RelativeLayout mRlayout = (RelativeLayout) findViewById(R.id.checkFieldsLayout); for (int i = 1; i < fields.size(); i++) { RelativeLayout.LayoutParams params1 = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); pa...
doc_40433
Sub Email() ' ' Email Macro ' Sheets("Email").Select Dim outlookapp As Object Dim myMail As Object Dim source_file, to_emails, cc_emails As String Dim i, j As Integer ActiveWorkbook.Save Set outlookapp = CreateObject("outlook.Application") Set myMail = outlookapp.CreateItem(olMailItem) myMail.Display For i = 2 To 6 ...
doc_40434
EDIT - 1 I got it guys, instead of gethostbyname('demo.sample.com') I tried gethostbyname_ex('demo.sample.com') It gives the result as I expected. A: From the documentation it is visible that: * *gethostbyname returns only a single IPv4 address. And to cite: See gethostbyname_ex() for a more complete interface. *...
doc_40435
e.g. const schema = ({ min: number(), max: number(), }); Could I add a validation rule that says data.min < data.max? EDIT: Adding examples Ankh's example is what really helped me as the docs are a bit lean. The Joi tests for ref helped with the rest of refs features. Also included below is my experiment ...
doc_40436
I am new-ish to python, but I was wondering if it is possible to store a function in an array? I want to do an array multiplication, where the value of one array is multiplied by a function on a location of another array of functions. Or actually, the value of the first array is inserted in the function of the designat...
doc_40437
,[object%20Object] which makes the link unusable. How can I strip that away? I would like the links that are generated to look like this: www.example.com Instead of like this: www.example.com/,[object%20Object] This is what I have: <html> <head> <script> function top_stories(o) { var items = o.que...
doc_40438
In totalWeekHours I have all the working hours and I have replace HH.mm format in HH:mm but I don't know how to parse it in timespan and then Sum() using Linq. please help. var totalWeekHours = (from twh in db.MytimeMaster where ((twh.date >= lstsun && twh.date <= tilldate) ...
doc_40439
cpan Statistics::Multtest cpan Text::NSP::Measures::2D::Fisher::twotailed The response is the next: Warning: Prerequisite 'List::Vectorize => 1.00' for 'JOKERGOO/Statistics-Multtest-0.14.tar.gz' failed when processing 'JOKERGOO/List-Vectorize-1.05.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limit...
doc_40440
// Setup module var DatatableAdvanced = function() { // Basic Datatable examples var _componentDatatableAdvanced = function() { // Ajax DataTable var ajaxTable = $('.datatable-ajax'); var table = ajaxTable.data("table"); var search = ajaxTable.data("search"); ajaxTab...
doc_40441
How is this possible? I was always led to believe that Javascript isn't able to access anything other than the browser itself because this would be a security issue, so how does this work? A: This is probably not the way, but in the old days what most applications did was register a protocol that they listened on. So ...
doc_40442
so i made validator to check it. _service method returns list of error codes, that correspond with properties which are not unique. Now how can I get response message or several in accordance with returned result codes? RuleFor(x => x.User) .MustAsync(async (q, context, token) => { var errors = await _s...
doc_40443
I have also used boost module but it’s not comfortable for multilingual website. Please tell me any other way so I will improve performance. Thanks in advance. A: your question has a whole host of answers, instead of listing all (which i would have to copy from several sites), here are a few main ones, and some resour...
doc_40444
A: Reports 6i is a client-server technology. You copied .REP files to each client and users ran their own copies of reports, using fonts installed on their own computers. Reports 12c runs on web (I guess you use Weblogic server) which means that reports' executables are stored on the server, while users just see the r...
doc_40445
new_manufacturing = models.execute_kw(db, uid, password, 'mrp.production', 'create', [{'name':'M0001','product_id':155,'product_uom':1, 'bom_id':54, 'state':'draft' }],) and then make it ready to production,then production started, reserve_materials = models.execute_kw(db, uid, password, 'mrp.production', 'force_produ...
doc_40446
when i select H from the drop down and click on submit button , i want to add that H to ui with incresing top by 20px , but while it reaches beyond 180px it does not work anymore and stays at 0px. Here is how it showing in browser here is what i tried import react from "react"; import "../index.css"; import { useState,...
doc_40447
firestore().collection('project').where('userID', '==', authStore.uid).onSnapshot(onResult, onError); This returns a huge amount of data, but I only need a few fields. Is it possible to query only a specific field? For example, if I only need the projectName and the creationDate fields. A: Is it possible to query on...
doc_40448
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE32F_ARB, width, height, 0, GL_LUMINANCE, GL_FLOAT, data); but in this case I have to use OSG. The code runs fine when using Image* image = osgDB::readImageFile("someImage.jpg"); instead of image = new Image; but I need to upload generated float data. I...
doc_40449
I have two regions in my form with multiple regions. I want to call render for another region. How can I do it? <h:form> <a4j:region id="rg_1"> <h:inputText id="field1" value="#{bean.field1}"/> </a4j:region> <a4j:region id="rg_2"> <a4j:commandLink action="#{mybean.resetBean} render="regio...
doc_40450
pTable_tags: | id | tag | id_pTable | 1 | tag1 | 1 | 2 | tag2 | 1 pTable: | id | value | | 1 | x | How can I do a SELECT to get the pTable value WHERE tag = tag1 and tag = tag2 at the same time. note: I can't use an OR because it must fulfill both conditions. A: You can use the ...
doc_40451
function testThis() { var optionset = document.getElementById("new_makeyear"); console.log("this is supposed to be something " + optionset.Options.length); } "new_makeyear" is an option set. The log statement was just so I can see the behavior through the console. What's the problem? Thanks A: As Henk mention...
doc_40452
case 'callme': let nick = args[1]; setNickname(nick); //this is where i am stuck break; I'm not sure how to define the person who sent the command so that their own nickname gets changed accordingly. A: Be sure that your bot has the appropriate permissions to manage and change nicknames otherw...
doc_40453
How can we query for all the data that belongs to a specific client and group? (An example written using Entity Framework 6 would be great.) We could do something like this: var parentChild1 = dbcontext.Parent1.Include(p => p.Child1).Select(p => p.ClientId = clientId).ToList(); var parentChild2 = dbcontext.Parent2.Inc...
doc_40454
i.e Dataframe-1 look-alike below (Where we have to search): Dataframe-2: Output Which I want: I am using spark scala here. I want an exact word match from dataframe-2 in dataframe-1. I have used function such as like, rlike, contains but it is not giving me the output which I want. Can anyone know how to develop thi...
doc_40455
For i = 1 to 4 'execute some code For k = 1 to 4 'execute some code Next Next This will give the following combinations of i and j: [1,1] dont want as 1 is repeated twice [1,2] yes please [1,3] yes please [1,4] yes please [2,1] dont want as [1,2] was already given, the order doesnt matter [2,2] don...
doc_40456
{ private class Date { public Date(int month, int day, int year) { ... } } private String name; private Date birthDate; public Person(String name, Date birthDate) { ... } } Above, I have an outer class, Person, and a private inner class, Da...
doc_40457
The attributes below are not available with these [DurableClient] IDurableOrchestrationClient starter [OrchestrationTrigger] IDurableOrchestrationContext context [ActivityTrigger] I get an error with .NET Worker What is the equivalent with .NET 7? EDIT I have got this compiling now but I get IDurableOrchestrationCli...
doc_40458
Thanks in advance, Sunny Carrandi A: This really depends on where you are coming from. If you are in the Web UI you should see the user grayed out and in some cases the word "(inactive)" after it. In terms of the API, the namespace: <snx:userState> is the indicator for an active or inactive user. A: User life cyc...
doc_40459
class EntityBase { } // base class for all types class Person : EntityBase // specific implementation for type Person // ViewModel project class EditableViewModel<T> where T : EntityBase // base class for all viewmodel types class PersonViewModel : EditableViewModel<Person> class CollectionViewModel<T> where T : Edita...
doc_40460
async function uploadFileToAws(file){ const fileName = `new_file_${new Date().getTime()}_${file.name}`; const mimetype = file.mimetype; const params = { Bucket: config.awsS3BucketName, Key: fileName, Body: file.data, ContentType: mimetype, // ACL: 'public-read' };...
doc_40461
So for a sample of the matrix: V.1 V.2 V.3 V.4 V.5 V.1 10 0 2 1 0 V.2 1 12 0 0 0 V.3 0 0 9 4 0 V.4 0 2 0 11 3 V.5 4 1 0 0 11 Therefore, the User's accuracy for V.1 would be (10/13)*100%. Similarly, the Producer's f...
doc_40462
entries#new view: <% form_for(@entry) do |f| %> <%= f.error_messages %> Name<br /> <%= f.text_field :name %> Mailing Address<br /> <%= f.text_field :address %> #... <%- if current_user -%> <%= f.label :live %><br /> <%= f.check_box :live %> <%- end -%> <%= f.submit 'Create' %> <% end %> ent...
doc_40463
The tutorial does not explain how to instantiate a Fragment properly. It uses a Fragment.NewInstance method, which doesn’t exist in a class which inherits from Android.Support.V4.App.Fragment. After a little research I discovered, that this was a static method, which was not mentioned in the tutorial. This method basic...
doc_40464
The set is declared as follows private SetMultimap<String, Foo> fooMultimap; private StatusService() { this.fooMultimap = Multimaps.synchronizedSetMultimap(HashMultimap.<String, Foo>create()); } Where the StatusService is a spring boot @Service which of course is treated as a singleton. The SetMultimap is a multi...
doc_40465
wget ftp_site_name/file_name But I could not download the same file when I run wget inside a perl script system "/usr/bin/wget ftp_site_name/file_name"; or system "wget ftp_site_name"; Here is the snippet of the error message: Resolving ftp site ...xx.xx.x.xx Connecting to ftp site|xx.xx.x.xx|:xx... connected. ...
doc_40466
I want to get "A" objects but I don't want to get those that have no pointer to B. How can I do that? EDIT: To clarify better my question I am editing it: PFObject A has a pointer to B. In a query I query for A objects, but I want the query to return any A objects that don't have a valid pointer to B. So, "don't return...
doc_40467
Vagrant.configure("2") do |config| config.ssh.forward_x11 = true config.vm.define 'test2' do |machine| machine.vm.box = "ubuntu/xenial64" machine.vm.network :public_network, ip: "192.168.33.23" machine.disksize.size = "15GB" machine.vm.synced_folder "./data", "/root/data" machine.vm.provider "vi...
doc_40468
doc_40469
Since that server is local on my network, I can further clone the project that is accessible via samba or even open it on my preferable editor and work on it from there, doing the changes I need or anything else. Here is where things get complicated, I would like to be able to keep the clone I have on my server, synchr...
doc_40470
<div class="social twitter"></div> I am trying to get the name of the second class onclick: $( ".social" ).bind( "click touchstart", function() { var sn = $(this).**SECOND_CLASS(= twitter)**; }); any ideas on how this could be done? Thank you A: May help you can use this code if you have just one space ...
doc_40471
x = np.empty(shape=(100,5)) for i in range(0,100): for j in range(0,5): a = 1 b = 2 c = a+b x[i,j]=c print(x) But, let's say, I'd like to write the word mango in a matrix: x = np.empty(shape=(100,5)) for i in range(0,100): for j in range(0,5): x[i,j]= "mango" print(x) ...
doc_40472
* *com.example *com.example.common *com.example.test *com.example.test.repository my main spring boot class is as follow package com.example.test; @Import({ AutoConfig.class }) @SpringBootApplication public class testApplication { public static void main(String[] args) { SpringApplication.run(testApplicati...
doc_40473
(n)+((n-1)*2)+((n-2)*3)+((n-3)*4)+...+(3*(n-2))+(2*(n-1))+(1*(n)) what is the tight bound of this? or the upper bound? is this n^3? is this n^4? the maximum amount of number i can get out of this? thanks EDIT: so: for i=1 then: the ans is 1. i=2: (1*2 + 2*1) 1=3: (1*3 + 2*2 + 3*1) i=4: (1*4 + 2*3 + 3*2 + 4*1 ) and so...
doc_40474
A: Create a separate class of type UITableViewCell lets say MyTableCell then design the cell in that MyTableCell class as per your need. Now you can use the object of MyTableCell in datasource method of tableView where you are actually putting the table -(UITableViewCell *)tableView:(UITableView *)tableView cellForRow...
doc_40475
Eg return ContextSet().Select(x=> x.FirstName == "John") vs ContextSet().Where(x=> x.FirstName == "John") When should I use .Select vs .Where? A: Select is a projection, so what you get is the expression x=> x.FirstName == "John" evaluated for each element in ContextSet() on the server. i.e. lots of true/false valu...
doc_40476
I have two table , first is user_faktorha save invoices data and second is u_payment save payment data . What I want: I want to group all data from this two table and have a result as one table with sum both table. My two table with sample query's is on sqlfiddle : http://sqlfiddle.com/#!2/b9f9e/4 What's problem: I t...
doc_40477
Approach 1 module DomainCRUD = let getWhere collection cond = ... module DomainService = let getByCustomerId f customerId = f(fun z -> z.CustomerId = customerId) // USAGE: let customerDomains = DomainCRUD.getWhere collection |> DomainService.getByCustomerId customerId Approach 2 type DomainCRUD(...
doc_40478
Is there a way for my application to query the Marketplace application and then notify the user if a newer version is available ? A: Personally I don't think it's quite that black and white. Lets say you've made a mistake somewhere in your app. You fix it and deploy to market. But you see from your crash reports that ...
doc_40479
public class MoviesAdapter extends RecyclerView.Adapter<MoviesAdapter.Mo`viesHolder> { Context context; ArrayList<String> mImages; ArrayList<String> mTitle ; ArrayList<String> mReleaseDate; ArrayList<String> mSynopsis; ArrayList<Double> mAverageRating; public MoviesAdapter(Context context,...
doc_40480
1) Some text is already present in Textbox. 2) Click on Radio button. 3) Processing popup is displayed for few seconds. After popup disappears the textbox becomes blank 4) After textbox is blank then I have to enter different value in text box. Please help me, how to wait till textbox value is blank. I am automati...
doc_40481
'Domain Admins', 'Administrators', 'Enterprise Admins', 'Schema Admins', 'Server Operators', 'Backup Operators' | ForEach-Object {$groupName = $_; Get-ADGroupMember -Identity $_ -Recursive | Get-ADUser -Properties Name, DisplayName | Select-Object Name, DisplayName, @{n='GroupName';e={ $groupName }}} Howev...
doc_40482
and I wonder why how to make this listview accessible without an internet connection. Here I give you a snippet of my ListView Class: public class ProjectsList extends Activity { ListView lstTest; ProjectAdapter arrayAdapter; ArrayList<Project> prjcts=null; @Override public void onCreate(Bundle sa...
doc_40483
const myArray = [{ date: "2017-01-01", Name: "test1" }, { date: "2017-01-02", Name: "test2" }, { date: "2017-02-04", Name: "test3" }, { date: "2017-02-05", Name: "test3" } ] I want to convert this into: const myArray = [{ group: "Jan", data: [{ date: "2017-...
doc_40484
There is a problem though as sometimes the script is triggered by the CRON so it starts but there are still files being added to the directory. At the start of the script I need to implement a check that gets the number of files in the directory remembers it and then does the check again in for e.g. 30 seconds. If th...
doc_40485
For example, I want to see January 2015 top 10..then February 2015 top 10..then March 2015 top 10..and so on. I want to be able to do this without clicking on the graph. I just want to sit back and watch the video. How do I do this? Here's the code with some sample data: var data = [ {"name": "apple", "c...
doc_40486
All the "pages" of my flex site run straight down the middle with no variation. And I've got a logo at the top of the page. So, I was thinking that it might be possible to add the Google Adsense code in Flex's HTML template. As all of my "pages" have the same lay-out, content won't overlap any ads. I also read that th...
doc_40487
class NewSaveTool(Tool): JS_CODE = """ import * as p from "core/properties" import {ActionTool, ActionToolView} from "models/tools/actions/action_tool" export class NewSaveToolView extends ActionToolView do: () -> save_name = @model.source @plot_v...
doc_40488
MulticastMessage multiCastMessage= messageBuilder.build(); BatchResponse response = FirebaseMessaging.getInstance(firebaseApp).sendMulticast(multiCastMessage); It is observed recently that when sending pushes to large number of users/registration tokens of around ~ 2 million, many users do not recieve the notification...
doc_40489
Nested let solution: (let [x 3] (let [y (+ 1 x)] y)) = 4 Desired solution: (let [x 3 y (+ 1 x)] y) = 4 A: Never mind, the desired solution works fine. I wonder why I was having trouble with it before?
doc_40490
$('#send-transaction').click(function(){ $.post('/authorized/test1',function(data){alert(data);}); }); And function test1() of authorized controller looks like: function test1() {echo "test";} How can I get it to return the function's output (in this case, string "test")? UPDATE The reason is in invalid controlle...
doc_40491
Here is my DataSource class where requests are sent to server. class HistoryDataSource() : PageKeyedDataSource<Int, DummyObject>() { override fun loadInitial( params: LoadInitialParams<Int>, callback: LoadInitialCallback<Int, DummyObject>) { //First load } override fun loadAfter( params: LoadParams...
doc_40492
useEffect(() => { api1(); api2(); }, []) const api1 = async () => { try { var requestModel = JSON.stringify({ UserId: userid, MenuName: menuname }); var requestBody = security.encrypt(requestModel); axios.myHashData = security.computedHmac256(requ...
doc_40493
#include <windows.h> #include <SFML/Graphics.hpp> #include <gl/gl.h> #include <gl/glu.h> class Scene { public: void resize( int w, int h ) { // OpenGL Reshape glViewport( 0, 0, w, h ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); gluPerspective( 120.0, (GLdouble)w/(GLdou...
doc_40494
A: You are correct that LightSail balancers only support 1 certificate, but that single certificate can support up to 10 domain names. One of the domains is the "main" one and the other (up to) 9 are "alternate" domains and subdomains, but operationally it doesn't make any difference which one is the "main" one and wh...
doc_40495
I have already added a button to the tinymc in der init file. The plugin is registered but the HTMLElemnt does not work. I have tried different ways but non of the works. The scenario for the implementation is to use custom contents which are coming from a data base in the tinymce editor, this happens via drag and drop...
doc_40496
It gives the rank of the smallest number whose remainder is 0 after dividing by 7 in the above given index. create the algorithm. I WAS TRY BUT I FAİLED.. I'M YET NEW TO JAVA .. A: Here's some hints: To test if an integer named x is divisible by 7: if (x % 7 == 0) { // x is divisible by 7 } To enumerate all the i...
doc_40497
CONFIG = { "camera_config":{"background_color": "#003399"} } but the background doesn't change; is there something else needed to change the background? A: Tried this from a GraphScene and it didn't work. What did work however was: def construct(self): self.camera.background_color = WHITE A: I'm not sure i...
doc_40498
$('span').filter(function() { return $(this).text().toLowerCase()==phrase; }).text(translation); $('span').filter(function() { return $(this).hasClass('translatable') && $(this).text().toLowerCase()==phrase; }).addClass(translated); This works, but is clearly going through all the <span>s twice. Is it poss...
doc_40499
How do I sync to remote server when some update happens in the local machine ? I know this is possible but I need a start.. A: Use mysql's replication feature