id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_4200 | import numpy
def mergeSort(a):
if len(a) ==1:
return
if len(a) == 2:
if a[0] > a[1]:
tmp = a[0]
a[0] = a[1]
a[1] = tmp
return
x = a[0:len(a)/2]
y = a[len(a)/2:]
mergeSort(x)
mergeSort(y)
j=0
k=0
for i in xrange(len(a)):
... | |
doc_4201 | a+c+c+b+v+f+d+d+d+c
I need to write the program so it splits at the + then deletes the duplicates so the output is:
acbvfdc
I've tried tr///cs; but I guess I'm not using it right?
A: #!/usr/bin/env perl
use strict; use warnings;
my @strings = qw(
a+c+c+b+v+f+d+d+d+c
alpha+bravo+bravo+bravo+charlie+delta+de... | |
doc_4202 | #!/usr/bin/perl -w
use strict;
use warnings;
sub foo {
return wantarray ? () : "value1";
}
my $hash = {
key1 => foo(),
key2 => 'value2'
};
use Data::Dumper;
print Dumper($hash);
I get the following output:
$VAR1 = {
'key1' => 'key2',
'value2' => undef
};
When I would expect:
$VAR1 = {
'key1' => ... | |
doc_4203 | grails.project.dependency.resolution = {
plugins {
...
compile ":solr:0.2"
}
}
and (the deprecated):
$> grails install-plugin solr
but it didn't work. Is this plugin still valid or there are other alternatives for using Solr with Grails 2.3.3?
A: I think development might be inactive on this... | |
doc_4204 |
A: It is not possible. As per Robotil
1) Download Robotil.jar
2) Start Robotil server on a remote machine.
So you have to place the Robotil.jar in the remote machine and have to execute the jar file.
And SauceLabs only provides grid URL and can be used only to create RemoteDriver Instances , it wont allow you to e... | |
doc_4205 |
*Create a new "Shell Tool" target in your Xcode project called something like "UnitTests"
So question: what is a shell tool target for a Xcode project. Is it still available in Xcode 6. If it is, where? If it is not, any workaround?
Edit: I don't want to use XCTest because (a) it is not cross platform (b) it ... | |
doc_4206 |
A: well, i think you should take a look at some cocoa development related books or websites - like cocoadev cocoadevcentral cocoabuilder ...
in short:
define your
IBOutlet NSTextField* timeLabel;
in your controller class and hook it up to the NSTextField in your NIB.
take a look at NSDate and update it (via a NSTimer... | |
doc_4207 | Since, I am new to jQuery I am not sure what exactly this error means.
I am using a jQuery plugin jquery-gauge.min.js which contains a method gauge() as shown below which works perfectly fine and normally in any web application.
import {
Component,
ViewChild,
ElementRef,
AfterViewInit,
OnInit
} from '@angular... | |
doc_4208 | "business_id": 2,
"forms": {
"f522": {
"id": "f522",
"is_deleted": 0,
"title": "Form 1"
},
"f8b6": {
"id": "f8b6",
"is_deleted": 0,
"title": "Form 2"
},
"fw56": {
"id": "fw56",
"is_deleted": 0,
"title": "Form 3"
}... | |
doc_4209 | await Navigation.PushModalAsync(page);
It shows the page... and then just keeps going. It does not stop to wait for the 'modal' page to close.
I'm not really sure what the point of calling this 'Modal' is and I wanted to be sure I was not missing some obvious thing. It seems to be exactly like Navigation.PushAsync(). I... | |
doc_4210 | I am creating a GUI application.
This class gets a number from the user and shows a table on the Frame.
When I run my class, I enter a number and click the JButton, but the JLabel on my Frame is not shown.
It does not show me why not.
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
i... | |
doc_4211 | Right now it shows the first notification just fine, but after that it triggers 2 notifications at the same time (see current output below). It doesn't wait for the previous notification to show and then hide again before showing the next one.
notifications.api.ts:
public notifications = new Subject<INotificationEvent>... | |
doc_4212 | I am trying the --python-install-data location-to-install-data-files option in the fpm command that generates the rpm. When I do rpm -i package-path.rpm, I expect the data files to be installed at the location specified in the fpm command. Yet that is not happening. What could be the problem?
| |
doc_4213 | #--errorHandler.py
# python 3
try:
from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import smtplib
# python 2.7
except:
from Tkinter import *
import ttk
import tkMessageBox as messagebox
import smtplib
class errorHandler:
def __init__(self, master):
... | |
doc_4214 | from scrapy.spider import Spider
from scrapy.http import FormRequest, Request
from scrapy.selector import HtmlXPathSelector
class IndependentSpider(Spider):
name = "IndependentSpider"
start_urls= ["http://www.independent.co.uk/advancedsearch"]
def parse(self, response):
yield [FormRequest.from_res... | |
doc_4215 | and the author was talking about disconnected entities, which is the first time I have heard of them. I am a little confused as to when disconnected entities are actually needed, as I have been using EF just fine to do CRUD operations on my business objects. If I am using the same context when I am doing CRUD operation... | |
doc_4216 |
const items= [{
prop1: 'abc',
prop2: 'def',
prop3: {
prop4: '123',
prop5: '456',
}
}];
I programmed a function to filter the data based on the passed objects in the filters variable. It works fine.
const onFilterData = (
items,
filters) => {
return ite... | |
doc_4217 | <input class="Eingabefeld "type="text" id="valueTwo" onkeypress="return isNumber(event)" />
i wanted to change it to addeventlistener, so after some research i came up with this, but it doesnt work
document.getElementById("valueTwo").addEventListener("keypress",validate);
function validate (event){
var result = isN... | |
doc_4218 | So, what I'm trying to do is settng the focus on textbox after OnTick event. I'm using following line:
ScriptManager1.SetFocus(this.txtMessage.ClientID);
This works correctly. However, Main page or I should say masterpage's scrollbar changes their position which is annoying.
Please share your valuable experience.
than... | |
doc_4219 | With the following list format:
Name Number
Name Number
Name Number
And at last a button called "Add new.." Where we can add more of such names/numbers.
Also on long pressing any item, a context menu will come called Edit/Delete.
How do I go about doing this? With file writing and stuff, to save the data to sd while... | |
doc_4220 | I use debugger step by step, and found out it crashes at set(axs,'Parent',p);
on version 2018b.
version 2018b at line set(axs,'Parent',p); will call the program usejava.m, but not 2017a. Please help.
p=uipanel(gcf,'Units','normalized','Position',
[0 0.2 10.8],'BorderType','none','Tag','CursorPanel1');
set(p,... | |
doc_4221 |
A: The main thing you will need is a layer to add reliability. http://www.google.co.uk/search?q=java+reliable+udp
UDP is not reliable and any or all of the image could be lost unless you have a protocol on top of UDP to make it reliable.
I suggest you impliment this using TCP first as this is much simpler, and change ... | |
doc_4222 | Receive
cat < /dev/ttyO5 >> $file
Send
cat < $file > /dev/ttyO5
When i check the files, sometimes the receiver machine copies some bytes of the beggining of file at the end. Something like this:
ce16 8fa7 bf54 dc6b 238a #Original file
ce16 8fa7 bf54 dc6b 238a ce16 8fa7 #Generated file on receive machine
The number o... | |
doc_4223 | I am creating installation for my application using Installshield. What are the dependency files or "Merge modules" should I add in the installshield?
Is it necessary to add " Microsoft C++ Runtime Library" or "Microsoft Visual C++ MFC" Merge modules?
A: Static linking means the foo.lib was embedded in myapp.exe duri... | |
doc_4224 | def returnNumber() -> int | None:
retur 1
Is there any way to specify in the init function that we are going to return the class itself?
class Tree:
def __init__(self) -> Tree: #hereeee
because in language server auto completion appears
() -> None //this with a class init
() -> int|None // this with the functi... | |
doc_4225 | request.setAttribute("name", nameVariable);
request.setAttribute("surname", surnameVariable);
request.setAttribute("list", list); //Here are stored ultimately all the data (so name and surname also)
My list is being updated and I need to have the list being updated also. I know my list gets more items, but this code p... | |
doc_4226 | Error
syntax error, unexpected '(', expecting ')'
Routes
resources :events do
resources :sessions, path: "schedule", only: [:index]
end
View
<%= link_to "Back to Event", @event_path(@event) %>
Sessions Controller
class SessionsController < ApplicationController
before_filter :find_event
def index
@sessio... | |
doc_4227 | My setup: Arch Linux, Python 3.3, tornado, cherrypy 3.2
Trying to implement session handling for a web app using cherrypy.lib.sessions (for some reason often referred to as cherrypy.sessions in various forums, might be another version)
I am looking for an example of the following:
*
*instantiate a session object
*... | |
doc_4228 | I have a table coded like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style type="text/css">
table {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 1px;
border-color: #3A3A3A;
border-collapse: collapse;
}
... | |
doc_4229 | django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable
I dont know what i am missing or what is going wrong?
A: In venv\Scripts\activate.bat in last line add
set SECRET_KEY="XXXXXX"
and it will work
| |
doc_4230 | With certain parameters the webpage returns an error page. I want to trap this and do something else.
The code below works. I set up an invisible buffer image and load the webpage to it. Then in the onload() function I draw it onto a canvas element and check some pixel colours (here simplified to checking one byte of... | |
doc_4231 | update Records set ActiveStatus=0, TransactionStatus=0, LastUpdated=&
where ActiveStatus!=5 and LastUpdated!=&
and Pk in (select RecordPk from GroupRecordLink
where GroupPk in (select Pk from Groups where ActiveStatus!=5 and
DateTimeStamp>&))
I had a go rewriting it by following this post , but I am not sure my re... | |
doc_4232 | All those extra feature help noobs to gurus not only sometimes become a better programmer but also help them make their life easier.
One of the recent questions I found, was about the new dynamic variable introduced with the framework 4. Problem was it did not have highlighting nor intellisense. This was easily resolve... | |
doc_4233 | For instance:
....method()
{
int num = 0;
//wait for keydown Enter
num = Convert.ToInt32(TextBox1.Text);
//or
String s = TextBox1.Text;
num = Int.TryParse(s);
....
}
A: You should just generally change the control flow of your program. Either declare num at the class level, or call th... | |
doc_4234 | <ul class="announcements unread">
<li>
<div class="announcement-text">Test message
<a href="edit/231">Edit</a> <a href="delete/231">Delete</a>
</div>
</li>
<li>
<div class="announcement-text">Delete this message
<a href="edit/232">Edit</a> <a href="delete/232">Delete</a>
</div>
</li>
The numbe... | |
doc_4235 | svn *command* svn+ssh://dev.myserver.com/var/svn/myproject
every time I need to checkout, switch, or tag. Is there a way I can alias the repository path, so I can just run:
svn *command* myserver/myproject
My poor ol' fingers are tired :(
A: Alias in your .bashrc file:
alias sitesvn="svn info | egrep '^URL: (.*)' |... | |
doc_4236 |
*
*GCP ML Vision.
*Exported Model to tflite format (from the same GCP console).
*XCode for iOS development
*iPhone 11 pro
I am trying to use a Custom Object detector using MLKit and one model trained in GCP AutoML Vision.
I created the model and exported as tflite file, but when trying to do objectDetector proces... | |
doc_4237 | i have just changed the urlRegistration and urlLogin variables in BackgroundTask Class from "http://tabian.ca/LoginAndRegister-register.php" to my "http://lmonstergirl.0fees.us/LoginAndRegister-register.php".
database is same as the project.
whenever i want to register anyone, i get "successfully registered user" mess... | |
doc_4238 | Here are some sample crash logs, does anyone have any idea how to trace this bug?
By the way, the game is developed using cocos2d-x running Lua script.
A/libc(23865): Fatal signal 11 (SIGSEGV) at 0x5e0a5024 (code=2), thread 23911 (Thread-5252)
I/DEBUG(252): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** **... | |
doc_4239 | Check error.log file. Nothing found.
Browser send the following message:
Firefox:
This pdf document might not be displayed correctly.
Chrome:
Error
Failed to load PDF document.
Here is my code:
// AppController.php
class AppController extends Controller
{
public function initialize()
{
parent::initial... | |
doc_4240 |
Service1 Service2 Service3
Nginx Proxy <-> Nginx Proxy <-> Nginx Proxy
| | |
Docker PHP+Apache Docker Java Docker Python
|
Requests using Guzzle
each proxy send requests to a specific Docker container. Onl... | |
doc_4241 | I have two SWF.
One with the game that we created and an other one with the MainMenu of the game.
I want to load the SWF of the game when I Click on play on the MainMenu.
I add this code on the first frame of the MainMenu :
btnJouer.addEventListener(MouseEvent.CLICK,jouer);
function jouer(pEvt:MouseEvent){
var req... | |
doc_4242 | A sample code to demonstrate my issue:
#include <iostream>
#include <boost/graph/directed_graph.hpp>
#include <boost/graph/graphviz.hpp>
#include <boost/property_map/transform_value_property_map.hpp>
class VertexClass
{
public:
VertexClass() { id = 12; }
VertexClass( int newId ) { id = newId; }
int get_id(... | |
doc_4243 | var xml = "<rss version='2.0'><channel><title>RSS Title</title></channel></rss>"
is replaced by a SOAP snippet, like the one below
var xml = "<xyz:ServiceName>GetDetails</xyz:ServiceName>"
I get an invalid XML error or an Invalid/Unexpected Token error.
What should be the procedure to access the value inside
<xyz:S... | |
doc_4244 |
A: I have this issue with one of the earlier Android studio releases. I have solved by updating the Gradle version. It may be solved your issue.
| |
doc_4245 | 1) The application process some data and put the final string on Active MQ.
2) I have used message-driven-channel-adapter and service-activator to read the data from the queue.
3) That data is displayed successfully on Server(application is working as a client) using tcp-outbound-gateway.
4) I am using single-use="true... | |
doc_4246 | mongoClient.connect(mongourl,function(err,database){
if (err){
throw err;
}
database = database.db('quac');
app.get('/', routes.index(database));
app.post('/add/:title', routes.add(database));
});
I would like to avoid this wrap and rather load the database reference in first place.
Wh... | |
doc_4247 | public class Account
{
public Account()
{
Id = Guid.NewGuid();
ContactCard = new ContactCard();
}
//[ForeignKey("ContactCard")]
public Guid Id { get; set; }
public string Name { get; set; }
public string Number { get; set; }
public ContactCard ContactCard { get; set; }
}... | |
doc_4248 | Is there any documentation on how to connect Stetho to the V8 runtime I'm using ?
A: If the question is still relevant - I have created j2v8-debugger library.
It allows debugging J2V8 using Chrome DevTools.
Basic features like setting/removing breakpoints, step into, step out and step over, variables inspection, etc.... | |
doc_4249 | Basically, I'm trying to make this code generic:
if (filter.matchMode.ToUpper().Equals("EQ")) {
query = query.Where(x => x.SomeField.Equals(filter.Value));
if (filter.matchMode.ToUpper().Equals("LT")) {
query = query.Where(x => x.SomeField < filter.Value);
} else [... 5 other match modes ...]
}
Now, SomeField is o... | |
doc_4250 | Currently, this template is a basic application with many component like:
*
*SpinnerModule (Spinnercomponent, SpinnerService)
*Menu (MenuComponent, MenuService)
*CustomHTTP (CustomHTTP extending HTTP)
*Etc...
To avoid the possibility of any edition on our global component, I would like to put every module on a... | |
doc_4251 | def main():
setLogLevel('info')
net = Mininet(switch=LinuxBridge, controller=None)
h1 = net.addHost('h1', ip=None)
h2 = net.addHost('h2', ip=None)
s0 = net.addSwitch('s0')
s1 = net.addSwitch('s1')
s2 = net.addSwitch('s2')
r1 = net.addHost('r1', ip=None)
r1.cmd('sysctl -w net.ipv6.con... | |
doc_4252 | For example I have 2 products added at 3:00AM and then I will have 5 products added at 4:00AM.
I'm counting the products by it's createdAt field.
I have a sample data like this:
Products: {
"_id": {
"$oid": "603c62272aacbc0017e2e4b5"
},
"amount": 110,
"user": {
"$... | |
doc_4253 | However, sometimes those events seems to be called multiple times, causing RuntimeErrors (when trying to disconnect an event that is already gone).
Here is a snippet of code that shows a similar (and hopefully related) problem using default PushButtons.
To see the runtime error here, run the code, push one of the butto... | |
doc_4254 | Done so far:
*
*Loaded markers from the server in map view
*Generate random clusters only.
When I run the project it looks like this.
Screen shot of map view
It shows both markers and clusters both in the map view at zoom level 10. But I wanted to show clusters first then when I zoomed in it should show the real ... | |
doc_4255 | I would like the user to be able to select(highlight) the entire row in the grid and then be able to click on a button to process the data in that row. How could I do this?
I have not been able to find any information related to my problem. Any ideas would be greatly appreciated.
Here is the XAML:
<Grid x:Name="lstA... | |
doc_4256 | c := make(chan string)
work := make(chan string, 1000)
clvl := runtime.NumCPU()
for i := 0; i < clvl; i++ {
go func(i int) {
f, err := os.Create(fmt.Sprintf("/tmp/sample_match_%d.csv", i))
if nil != err {
panic(err)
}
defer f.Close()
w := bufio.NewWriter(f)
... | |
doc_4257 | "Structured data with syntax errors detected
Invalid items are not eligible for Google Search's rich results." Unparsable structured data
here is the code structured-data.liquid for How to resolve it and I also want to add FAQs schema to Shopify how to add FAQs schema to Shopify.
{%- if template contains 'index' -%... | |
doc_4258 | I have a code (google maps v3) that has an ajax request.
The request is part of the code and is used to push markers on google maps canvas.
My question is how to have a basic json data, like this {"id":"1","0":"1",lat":"40.626953","9":"40.626953","lng":"-73.900055","10":"-73.900055"} inside the jsfiddle?
I cut the fi... | |
doc_4259 | Like this:
"
List<data> list;
list = (List<data>)_changedItems.Values; //get values before clearing
_changedItems.Clear();
"
And adding is done by other threads with function _changedItems.AddOrUpdate
Now there is possibility to lose new data between getting data out from the dictionary and clearing content, if some ... | |
doc_4260 | The aim of this script is to retrieve the order details (item, quantity, price) as well as the user’s first name and surname (where ‘Order for:’ is).
The script below does everything ok in that it retrieves the order (and orders if there are more than one) and it’s/their item, quantity and price.
However, it doesn’t d... | |
doc_4261 | This line is fine:
ActiveRecord::Base.connection.tables
and returns all tables
but
ActiveRecord::Base.connection.table_structure("users")
generate error:
ActiveRecord::Base.connection.table_structure("projects")
I think that
table_structure
is not Postgres method.
How can I list all data from the table in Rails c... | |
doc_4262 | The initial time is saved onto SharedPreferences: 01:11:59 AM
Then I get the current time:
simpleDateFormat.format(new Date());
which yields the output as: 05:19:03 AM
The time difference of the 2 should be around 4 hours but the chronometer displays this: -691.33.46
Code:
Date date1 = simpleDateFormat.parse(initialTi... | |
doc_4263 | When I move my finger to get the next image its work for second and return to previous activity
The code look like this:
@Override
public View instantiateItem(ViewGroup container, int position) {
PhotoView photoView = new PhotoView(container.getContext());
photoView.setBackgroundResource(R.dra... | |
doc_4264 | let main = document.getElementById('main');
let fullscreen = window.innerHeight;
let headerHeight = document.getElementById('navHeader').offsetHeight;
let newsletterHeight = document.getElementById('newsletter').offsetHeight;
let footerHeight = document.getElementById('footer').offsetHeight;
let addHeight = headerHeigh... | |
doc_4265 | I created the constructor and a separate class called MenuItem
public class Menu implements Cloneable {
final int MAX_ITEMS = 50;
public Menu(){
MenuItem[] menu = new MenuItem[MAX_ITEMS];
}
}
I want to create a method that clones a Menu. How do I access the properties of ... | |
doc_4266 | (No, I'm not going to look at this question which basically duplicates my situation. I already did, and it didn't help me at all.)
This is my current code:
# tkinter
from tkinter import *
# class
class App(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
bo... | |
doc_4267 | I want to implement a functionality to pause the game when the pauseButton is pressed. But I'm not sure where and how. How is a pause and restart or returning one scene back handled in cocos2dx? I would love to hear from you!
Part of my code. How to add a pause in the pauseButton ?
Scene* GameLayer::createScene(int l... | |
doc_4268 | let placeHolder = ["place": ""]
let document = Firestore.firestore().collection("tweets").whereField("uid", isEqualTo: uid).collection("comments").document("hello")
document.setData(placeHolder)
| |
doc_4269 | On my window, I have 6 ComboBox.
If I select an item (displayed item1 for example) in a ComboBox, I want to disable this item1 for each others.
If I dropdown a second ComboBox, I can't select select item1 and chose item2.
In a third ComboBox, it will not possible to select item1 and item2. Etc ...
I use WPF with MVVM.... | |
doc_4270 | This is an example of the file data that would be in the properties.txt file:
FileLocation: "Z:\Folder\file.txt"
FileMkdirLocation: "Z:\Folder2\file.txt"
I want to use something like system(mkdir "sim-link_file_location" "file_location") by changing the data that is in properties.txt. I want to be able to add more th... | |
doc_4271 | class UserProfile(models.Model):
following = models.ManyToManyField('self', related_name='followers')
somewhere else in a serializer:
def get_followers(user):
return user.profile.followers
AttributeError: 'UserProfile' object has no attribute 'followers'
Is there another way I can implement followers? Maybe ... | |
doc_4272 | To run the test, the operator should just touch a button, and the app should send some configuration command messages to the hardware device, and listen for the confirmation response of each message.
I have implemented a BroadcastReceiver where I listen for the incoming messages. Then, I use a callback interface to sen... | |
doc_4273 | (def data [{:a 1 :b 2 :c 3} {:a 1 :b 2 :c 3}]
(for [xs data] (map xs [:a :b]))
((1 2) (1 2))
Final result should be ==> (2 4)
Basically, I have a list of maps. Then I perform a list of comprehension to take only the keys I need.
My question now is how can I now sum up those values? I tried to use "reduce" but it work... | |
doc_4274 | For example, I have a and b arrays with a size of 20 for N rows.
each row has a different a and b.
I would like to write a file with a format like this:
Names of each column
0 a[0] b[0] a[1] b[1] ... a[19] b[19]
1 a[0] b[0] a[1] b[1] ....a[19] b[19]
I can only think this way:
data = open(output_filename,'w')
for i i... | |
doc_4275 | float x[N];
float y[N];
for (int i = 1; i < N-1; i++)
y[i] = a*(x[i-1] - x[i] + x[i+1])
And I assume my cache line is 64 Byte (i.e. big enough). Then I will have (per frame) basically 2 accesses to the RAM and 3 FLOP:
*
*1 (cached) read access: loading all 3 x[i-1], x[i], x[i+1]
*1 write access: storing y[i]
... | |
doc_4276 | The User model has Messagable Trait where you can get all the threads with
$user->threads();
I am trying to eager load additional data to the threads array using the following:
$threads = Auth::user()->threads()->with(['participants.user'])->get();
What i am struggling is the Threads model has function to get the lat... | |
doc_4277 | How on earth should I add multiple elements into the XML. The schemaValidate() response:
DOMDocument::schemaValidate(): Element
'{http://www.stormware.cz/schema/version_2/stock.xsd}stockHeader':
This element is not expected. Expected is one of (
{http://www.stormware.cz/schema/version_2/stock.xsd}stockDetail,
... | |
doc_4278 |
Signin page/component :
const Signin = ({ currentUser }) => {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const { doRequest, errors } = useRequest({
url: '/api/users/signin',
method: 'post',
body: {
email, password
},
... | |
doc_4279 | public static void TruncateList(SPList list)
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(list.ParentWeb.Site.ID))
{
using (SPWeb web = site.OpenWeb())
{
web.AllowUnsafeUpdates = true;
SPList listCopy = ... | |
doc_4280 | function restUpdateByemail(Request $request,$email){
$students=student::find($email);
$students->name =$request->input("name");
$students->password=$request->input("password");
$students->gender=$request->input("gender");
$students->country=$request->input("c... | |
doc_4281 | ||
doc_4282 | ||
doc_4283 | <style type="text/css">
#header{
height: 20px;
background-color: #2A646C;
width: 50%;
margin: auto;
}
#container{
display:flex;
flex-wrap: wrap;
border: 2px solid red;
... | |
doc_4284 | My range of values for the drop-down should come from Range(A1:A5) in Sheet2 and Range(C1:C7) in Sheet2. However, my code below is not working, it runs an error 1004 at Add xlValidateList, xlValidAlertStop, Operator:=xlBetween, Formula1:="=Sheet2!$A$1:$A$5 & Sheet2!$C$1:$C$7" I suspect it has something to do with this ... | |
doc_4285 | <!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<!-- <link rel="stylesheet" href="http://openlayers.org/en/v3.2.1/css/ol.css" type="text/css">-->
</head>
<body>
<div id="map" class="map"></div>
<link rel="stylesheet" href="http://openlayers.org/en/v3.12.1/css/ol.css" type="text... | |
doc_4286 | Until now people have been working in their own private repositories, but now we want to merge the entire project in a single repository. The question now is: how should the directory structure look? Should we have separate directories for each language, or should we separate it by component/project? How well does pyth... | |
doc_4287 |
"type 'String' has no member 'playback'"
func playSound() {
guard let url = Bundle.main.url(forResource: "soundName", withExtension: "mp3") else { return }
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: [])
try AVAudioSession.sharedIns... | |
doc_4288 | What is the best way to go about it?
Maybe:
1. fork repo
2. make changes
3. update dependencies to use fork
(4.) make pr to original repo
A: I would advise not modifying the vendor directory yourself except for temporary debugging. Instead, in general the process today would be something like the following.
*
... | |
doc_4289 | I found one control that looks interesting (http://ammar.tawabini.com/2010/09/gridview-ajax-filter.html) but I'm wondering if there's some solution, which is more known / used / widespread / accepted by the community.
A: DevExpress has awesome grid with filter builder: http://demos.devexpress.com/ASPxGridViewDemos/Fil... | |
doc_4290 | Is there any workaround for this?
A: That's a basic fact of life for panels. It's not special to the TGridPanel, you will see the same effect for any control derived from TCustomPanel. The transparency is only supported when the application is themed.
The grid panel is just a convenient way to layout your controls. If... | |
doc_4291 | class SGD(Optimizer):
"""
An optimizer that does plain Stochastic Gradient Descent
(https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Iterative_method)
:param lr: the learning rate to use for optimization
"""
def __init__(self, lr):
self.learning_rate = lr
def run_update_ru... | |
doc_4292 | Possible Duplicate:
WCF service: app.config versus attributes or a mixture of both
can i override the hard coded configuration with the app.config configuration?
for example, i have this hard coded configuration:
[ServiceBehavior(TransactionTimeout = "00:02:00")]
public class DateTimeService : IDateTimeService
{
... | |
doc_4293 | - (void)viewDidLoad
{
[super viewDidLoad];
RKURL *baseURL = [RKURL URLWithBaseURLString:@"http://192.168.1.12"];
RKObjectManager *objectManager = [RKObjectManager objectManagerWithBaseURL:baseURL];
objectManager.client.baseURL = baseURL;
RKObjectMapping *markerMapping = [RKObjectMapping mappingFor... | |
doc_4294 | I tried different variants of overflow and animation-duration.
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<p>
<img class="logo" src="picture.png" width="80" height="80" align='left'>
<div id="marquee">
<div id="text">s... | |
doc_4295 | I write a small piece of php.
code:
public function actionModbus()
{
$errors = array();
$warnings = array();
$connection = BinaryStreamConnection::getBuilder()
->setPort(80)
->setHost('192.168.56.205')
->setReadTimeoutSec(3) // increase read timeout to 3 seconds
->build();... | |
doc_4296 | I need to be able to have a list of this object, and the list can also be serialized to xml and de serialized from xml.
I have tried dictionary type, but this is causing errors when serializing to xml.
I am using object xml serialization for the serialization.
What data type should I use? Does such a data type exist?
T... | |
doc_4297 | I want first div to expand to parent's or the second div's height according to the increment of the second div's height
<div id ="main">
<div id ="first">
<a href="#">Link</a>
<a href="#">Link</a>
<a href="#">Link</a>
<a href="#">Link</a>
</div>
<div id ="second">
<a href... | |
doc_4298 | def _remove_nans(self):
def get_without_nans(array):
mask = np.invert(np.isnan(array))
return array[mask]
self.average_dynamic_depth = get_without_nans(self.average_dynamic_depth)
# ... many more similar lines to clear more arrays
This works, but is hard to read and... | |
doc_4299 | I've been playing around with printing to my Samsung printer using the Windows driver that came with it, and it seems to work great. I assume though that other printers may not come with Windows drivers and then I would be stuck? Or would I be able to simply use the Generic/Text Driver to print to any printer that supp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.