id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23516100 | If I want to print a variable's address, can I do it like this:
int a = 19;
printf("%d", &a);
*
*I think, &a is a's address which is just an integer, right?
*Many articles I read use something like this:
printf("%p", (void*)&a);
*
*What does %p stand for? (A pointer?)
*Why use (void*)? Can't I use (int)&a in... | |
doc_23516101 | <p>case a</p> # only has a text node, selected
<p>case <a>b</a></p> # has a text node and an a node, selected
<p><a>case c</a></p> # only has an a node, not selected
</div>
Is there a way to select p nodes which not only have a nodes, i.e. <p>case a</p> and <p>case <a>b</a></p>, but not <p><a>case c</a></p>.
A:... | |
doc_23516102 | Here is my code:
CREATE FUNCTION getPredictedSales(forecastmonth int(2))
RETURNS DOUBLE(6,2)
BEGIN
SELECT @percentincrease = (SELECT (SUM(s19.totalsales) / SUM(s18.totalsales))
FROM Sales2018 s18
INNER JOIN Sales2019 s19 ON s18.month = s19.month AND s18.shopname = s19.shopname
WHERE s18.month = forecastmonth)
RETURN (... | |
doc_23516103 | 1.) For the checkPoint (Which is an integer value and this gives the bar chart the values data which is held under data in the js code). Which works perfectly
2.) For the module names (which is just Strings, the names of the module). which I paste under labels
However the names of the columns in my bar chart (module na... | |
doc_23516104 |
Apps using the Facebook SDKs for Javascript, Android and iOS, desktop apps or apps using the server-side login flow automatically generate long-lived user access tokens.
But I'm using the Facebook Javascript SDK, and I'm using the regular old FB.login, but the access tokens I get back all have one hour expiration tim... | |
doc_23516105 | i work on a jokto-linux-system where i write commandline instructions:
I want to know what is the difference of with checkmarks '...' and without those.
commandline with checkmarks:
curl 'http://localhost:80/uri/?$sortby=name' > data.json
commandline without checkmarks:
curl -i http://localhost:80/uri/?$sortby=name > d... | |
doc_23516106 | private void btnMaximise_Click(object sender, EventArgs e)
{
WindowState = WindowState == FormWindowState.Normal ?
FormWindowState.Maximized : FormWindowState.Normal;
}
Now I have several forms derived from BaseForm. When I click the Maximise button on Say Form1, all other derived forms are maximized together,... | |
doc_23516107 | I tried to test it by running it directly with a list inside writerow() and the result was the same.
url = "https://en.wikipedia.org/wiki/List_of_FIFA_World_Cup_finals"
html = urlopen("https://en.wikipedia.org/wiki/List_of_FIFA_World_Cup_finals")
wiki_bs_obj = BeautifulSoup(html, "html.parser")
table = wiki_bs_obj.find... | |
doc_23516108 | However, after that its "isDirty" flag is true, even after I save that model.
Here's a minimal Rails + Ember project (so I can actually save the model) that shows the situation:
https://github.com/csterritt/etst
Am I doing something wrong? Is this expected behavior?
Thanks!
Edit: Turns out that, as Jeremy Green point... | |
doc_23516109 |
A: set_time_limit — Limits the maximum execution time
set_time_limit ( 10800 )
A: So at last what I did is, I start a cron job which calls this script every 5 mins. In the script, I check a file whether it contains any message, if there is, I will send it to users if not ignore.
So when I set up the message to sent t... | |
doc_23516110 |
A: listFiles(String pathName) should work just fine for a single file.
A: The accepted answer did not work for me.
Code did not work:
String remotePath = "/remote/path/file.txt";
FTPFile[] remoteFiles = ftpClient.listFiles(remotePath);
Instead, this works for me:
ftpClient.changeWorkingDirectory("/remote/path");
FTP... | |
doc_23516111 | Trigger
This trigger will update a Type ID column based on the text inserted or updated into another column...This is to force typing on a badly designed table
CREATE TRIGGER [dbo].[TypeIDInsert]
ON [dbo].[Table1]
AFTER INSERT, UPDATE
AS
BEGIN
IF (SELECT TypeID FROM inserted) IS NULL
BEGIN
DE... | |
doc_23516112 | Eg :
>> #(Query string as passed by user)
>> query = i am searching for a document that is matched fuzzily with what i am giving here.
>> QueryParser("content", ix.schema).parse(query)
This query will look for documents with all the words but i want to find all those documents which contain at least 60% or more of th... | |
doc_23516113 | I have discovered three situations where Python (in this case, 2.6.4) does not call my overridden __setitem__ method when setting values, and instead calls PyDict_SetItem directly
*
*In the constructor
*In the setdefault method
*In the update method
As a very simple test:
class MyDict(dict):
def __setitem__(... | |
doc_23516114 | I have read design guidlines for Windows Phone 8.1, I get the system of scaling images and their name convention, but I haven't found the advice which screen sizes should I consider in real?
I got a psd from graphic designer in size 720x1280 and there is a background image. Is it enough?
If I get it right, Nokia Lumi... | |
doc_23516115 | [Container] 2019/06/10 04:52:15 Running command & "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
-p:FrameworkPathOverride="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v$env:DOTNET_FRAMEWORK" $env:SOLUTION & : The term 'C:\Program Files (x8... | |
doc_23516116 | I need to find all tables related with certain table (let's call it TargetTable) both related directly and inderectly (through 1, 2 or more intermediate tables) on any column.
My finish goal to get SQL queries (one per each related table) which JOIN all tables between TargetTable and that related table.
For example: it... | |
doc_23516117 | So far I'm thinking of using a table like this,
schedule_id SMALLINT,
start_date TIMESTAMP,
end_date TIMESTAMP,
category_id SMALLINT,
annual BOOL
Simple enough, the database can select any rows where the time falls between start/end.
My issue comes in with my annual flag. Basically I'm thinking that once a day the... | |
doc_23516118 | Here is the search function on the Events controller
public function search()
{
$keyword = $this->input->post('keyword');
$data['events'] = $this->event_model->get_events_by_keyword($keyword);
$this->session->set_flashdata('event_search', 'Showing all results relating to '.$keyword);
$this->load->view... | |
doc_23516119 | public class Person{
private String name;
private Date birthdate;
//0-arg constructor
public Person() {
birthdate = new Date("January", 1, 1000);
name = "unknown name";
}
//2-arg constructor
public Person(String newName, Date newBirthdate){
this.name = newName;
this.birthdate = newBirthdate;
}
//Subcla... | |
doc_23516120 | use hashbrown::HashMap;
fn main() {
let mut sphere: HashMap<String, Vec<&str>> = HashMap::new();
sphere.insert(String::from("junior"), vec![]);
sphere.insert(String::from("Middle"), vec![]);
sphere.insert(String::from("Senior"), vec![]);
loop {
println!();
let mut input = String::ne... | |
doc_23516121 | print ("Input done when finished")
print ("Input thresholds")
maximumnum = int(input("Input maximum number: "))
minimumnum = int(input("Input minimum number: "))
minimum = None
maximum = None
while True:
inp =input("Enter a number: ")
if inp == "done":
break
try:
num = float(inp)
e... | |
doc_23516122 | at CKEDITOR.tools.extend.getComputedStyle (ckeditor.js:105:296)
at $.getDirection (ckeditor.js:128:386)
at $.setup (ckeditor.js:378:171)
at $.m (ckeditor.js:889:341)
at ckeditor.js:28:472
I am getting the above error when issuing the following
$('.htmleditor').each(function(e){
CKEDITOR.replace(this.id... | |
doc_23516123 | // routing.yml
foo_list:
path: /foo
defaults: { _controller:MyBundle:Foo:index }
foo_view:
path: /foo/{id}
defaults:
_controller: AlfnooBundle:Exploitant:view
id : 1
requirements:
id: \d*
The first one is for a page which lists all the foos, the second one is the page which... | |
doc_23516124 | Calculate screen size in android trying to find a way to set the size of multiple buttons (between 1 and 9) so that they will all fit on one screen. The buttons are created dynamically like this:
// put values into btn array
for (int i = 0; i < row; i++) {
tr = new TableRow(this);
for (int j = 0... | |
doc_23516125 | I will be work but i cant use the parseBookObject and this collected Datas to other Ways.
public static void parseISBN(fileObject) throws ParseException, ...
{
// New Book Object with Datas from FileObject
Book bookObject = new Book (fileObject.getPath, ...)
// parse ISBN with marc21
Marc21.parseISBN(boo... | |
doc_23516126 | What I want to make a training set something looks like this:
[1] -> [1] -> [1] -> [1] -> [1] -> [7] -> [7] -> [7] -> [7] -> [7] -> [3] -> [3] -> [3] -> [3] -> [3] -> ... and so on
Which means that firstly five 1s (batch size = 1), secondly five 7s (batch size = 1), thirdly five 3s (batch size = 1) and so on...
Can som... | |
doc_23516127 | namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string x = "";
string y = String.Empty;
}
}
}
If I build the application, the compiler underlines x,
The variable x is assigned to but it´s va... | |
doc_23516128 | I have a folder containing:
*
*foo_svn: folder (my current website)
*foo_tmp: folder (a copy)
*web: symlink (pointing on foo_svn)
My DocumentRoot is set on web.
Before svnupdating foo_svn, I backup the contents in foo_tmp and I replace the symlink so that it points on foo_tmp.
Then I update foo_svn: let's say in... | |
doc_23516129 | Here I have a scatter plot of the coordinates and above them I am plotting the grid.
The entire grid is way bigger, from the bottom left point (500,1250) to upper right point (2750, 3250), which means the whole grid is 225x200 sections.
I want to iterate through the sections of the grid and check if a point is inside.... | |
doc_23516130 | from server (sasl negotiation)
<stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.process-one.net/en/ejabberd/' ver='TQ2... | |
doc_23516131 | Here's the code:
function remodule(){
$(".tab").css({
"background-color":"hsl("+"100"+","+"50%"+","+"50%"+")",
"position":"relative",
"max-width": ($(this).parent.width - 15)/Math.sqrt($(this).prevAll.length),
"max-height": ($(this).parent.height - 15)/Math.sq... | |
doc_23516132 |
A: To check internet connection you can use dart:io like this:
import 'dart:io;'
Future<bool> checkInternetConection() async {
try {
final result = await InternetAddress.lookup('example.com');
if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
return true;
}
} on SocketException catch (_... | |
doc_23516133 | 1133254688 5698771509078629376
1150031904 5698771509371165696
1150031904 5698771510035551232
4170258464 5698771510036082688
2895583264 5698771510036715520
1620908064 5698771510037202176
346232864 5698771510037665280 <----
3366459424 5698771510038193664
2091784224 5698771510332259072
817109024 5698771510332816128 <---... | |
doc_23516134 | What comes to mind is to compare the first and second calls using the performance profiler. But when I try to start the profiler after running the application it runs a new instance of the application.
So, what can I do to compare different calls of a function?
A: It seems possible to attach Visual Studio performance ... | |
doc_23516135 | My expectation was that a div with display:none would not have any impact on formatting.
<html>
<body>
<div style="border-top-style: solid;">
<p style="float:left; width:280px;">
TEXT A<div style="display:none;"> </div>
</p>
<p style="float:left;">
... | |
doc_23516136 | Given that
var list = {x:1, y:2, z:3};
for (var property in list){
div.textContent = (list[property])
}
//Displays 3.
//Div is referring to my HTML page.
I want to be able to display 1, but then after a button is clicked, it will than display 2, 3, etc.. How could I do that?
A: You don't store previous value ... | |
doc_23516137 | I can view it in my browser by going directly to the file however when it is embedded the photos will not load. The images it loads has to be in the same directory as the .swf file and as i stated it clearly works when going directly to the file but not once it has been embedded.
If someone else has had this issue or k... | |
doc_23516138 | The regEx should validate;
*
*That the value start with a letter
*The following characters should be numeric
*No letter should be present after or in between the numerics
*The leading letter can be either Upper/Lower case
I also read that SQL Server 2008 doesn't support RegEx and I am actually on a SQL Server ... | |
doc_23516139 | I know how to solve the problem with 3 x N grid but writing the recursive formula for this is too hard for me!
I have no idea how to do it!
I created two functions F(n) - The complete way of tiling till N and S(n) for number of ways of incomplete tiling for 3 x N ! But here as the height is variable I cannot think of... | |
doc_23516140 | I would really appreciate some help/guidance from the experts.
thank you.
const express = require("express");
const bodyParser = require("body-parser");
const app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.get("/", function(req, res){
res.sendFile(__dirname + "/index.html");
});
app... | |
doc_23516141 | ========================================
ID NAME logtime (date time colum)
========================================
1 cat dd/mm/yyyy 10.30
2 cat dd/mm/yyyy 9.20
3 cat dd/mm/yyyy 9.30
4 cat dd/mm/yyyy 7.20
Secondary Table like
---------------------
Name improvement
-------------... | |
doc_23516142 | This is a long line text that I want to keep as a long single line. It should not be wrapped in the text output.
Using the text builder of Sphinx, I get this output:
This is a long line text that I want to keep as a long single line. It
should not be wrapped in the text output.
Sphinx wraps the line.
I would like t... | |
doc_23516143 |
A: You can't use the Aero Style under Windows XP, the Aero Style is part of the DWM(Desktop Window Manager ) which was introduced in Windows Vista, the only option is use a skin library which simulate this look and feel, so try using a library like the AlphaControls Lite Edition components. (Delphi XE2 include a skin ... | |
doc_23516144 | Any idea on how to achieve it?
UPDATE
My class
@interface GSOrderMenuMenuContent : GSBaseModel
@property (copy, nonatomic) NSNumber *order_content_id;
@property (copy, nonatomic) NSNumber *item_id;
@property (copy, nonatomic) NSNumber *price;
@property (copy, nonatomic) NSNumber *priceWith... | |
doc_23516145 | For my current project, I'm trying to make a scraper which can pass a query via POST method to a ASP page and parse a <td> value from the output page.
I've written the following code
import scrapy
class QuotesSpider(scrapy.Spider):
name = "quotes"
def start_requests(self):
start_urls = ['https://www.... | |
doc_23516146 | <canvas>
<ul>
<li><img src="1.jpg" /></li>
<li><img src="2.jpg" /></li>
<li><img src="13.jpg" /></li>
</ul>
</canvas>
When I place the ul outside, everything is showing up. I want to display the whole ul within the canvas. Is it possible? If possible then how? Thanks!
A: HTML elements cannot be placed... | |
doc_23516147 | print $output;
Can someone please help me figure out why the above line isn't doing what it's supposed to be doing? The idea is for it to create an 'at' job that will execute a php script. If I switch to the user apache(which will ideally control the at function when the php file is complete) I can run
echo "php $re... | |
doc_23516148 | But I package the source code to a binary without encryption, the result is successful.
It's the content of my directory:
directory/
run.py # as an entry to import package
setup.py # import setuptools and cython
my_pkg/
__init__.py
module1.py
module2.py
...
It's the content... | |
doc_23516149 | ng serve
An unhandled exception occurred: No projects support the 'serve' target.
See "/tmp/ng-YKKFYj/angular-errors.log" for further details.
in the same directory, where the angular.json, the package.json, src folder etc. is, see:
forest@forest:~/<project-path>$ ls -lsa
total 380
4 drwxrwxr-x 8 forest forest 4... | |
doc_23516150 |
Keras requires TensorFlow 2.2 or higher. Install TensorFlow via pip install tensorflow
The problem is that I had no choice but to install Tensorflow 1.15, because I have the following setup:
*
*Visual Studio 2019
*Python 3.7
*CPU i7 920 (no avs, only SSE)
*OS Windows 7 64
*Nvidia GPU
*CUDA 10.1
I had to downl... | |
doc_23516151 | Here comes the issue: In order to adhere to the exhaustive dependency rule of useEffect, I have to include the boolean state variable in the dependency array. However, that means that as soon as I deregister, the useEffect will run and re-register the mutation. Instead, I want the deregister to simply "prepare" for reg... | |
doc_23516152 | exec storedprocedure '01','1','2','3','2017-05-23 18:27:03.290','4','5','6','7',8,'2017-05-23 18:27:03.290','9',10
Do anyone knows the right syntax for converting these strings (@orderdate & @processdate) from string to datetime datatype? I'm currently using sql server 2008.
ALTER PROCEDURE [dbo].[table]
... | |
doc_23516153 | Binta
A: For recurring payments based on credit card data ('DPRP'), you can immediately call CreateRecurringPaymentsProfile and the recurring payment will be created immediately.
CreateRecurringPaymentsProfile will create the recurring payment and ensure it's billed on the period you told it to in the request.
| |
doc_23516154 | I read everywhere that the middleware definition (app.use(express.session({...) applies only to the routes that comes after it, so I created this sample:
var express = require('express');
var app = express();
app.use(express.bodyParser());
app.get('/path1', function (req, res) {
res.send('text response');
});
ap... | |
doc_23516155 | "parameters": [
{
"name": "status",
"in": "query",
"description": "Status values that need to be considered for filter",
"required": true,
"type": "array",
"items": {
"type": "string",
"enum": [
"available",
"pen... | |
doc_23516156 |
There is alignment issue image should be always attached with left and right corner as given in image. Now i'm using bootstrap container for this.
My Code:-
.p-relative {
position: relative;
}
.p-static {
position: static;
}
.img-1 {
position: absolute;
top: 0px;
left: 0;
}
.img-2... | |
doc_23516157 | and ASNAV-DEVWEB-23. I want to return the info ASNVA-DEVSQL-23 all the way up to Environment 50?
Can anyone assist with this?
Regards,
Joe
A: here is an example that will list sql instance of SQLSERVER1 and SQLSERVER2 :
"SQLSERVER1","SQLSERVER2" | % {
invoke-command -computername $_ -scriptblock{
"SERVER ... | |
doc_23516158 | I am aware that this can be fixed by modifying the rewrite rule in htaccess (.htaccess problem: No input file specified), however I am really looking for a server-wide fix that can be done without modifying each site's htaccess file.
So is there anything that can be added to the vhost (or somewhere else) to make FastCG... | |
doc_23516159 | This is a simplified code to show what i'm trying to do. The cudaMemcpy returns with cudaSuccess but the temp variable stays "empty".
class A {
public:
int *s;
};
__global__ void MethodA(A *a) {
printf("%d\n", a->s[2]);
}
int main() {
A *a = new A();
int asd[] = { 0, 1, 2, 3, 4 };
a->s = asd;
... | |
doc_23516160 | If I have a task that is running and I know the task id, how in the world can Celery figure out which machine its running on to terminate it?
Thanks.
A: I am not sure if you can actually do it, when you spawn a task you will have a worker, somewhere in you 50 boxes, that executes that and you technically have no contr... | |
doc_23516161 | The following code works on iPhone5/5s resolution, but not on the previous iPhone model:
ground1 = [CCSprite spriteWithImageNamed:@"ground1.png"];
ground1.position = ccp(self.contentSize.width/2,self.contentSize.height/2-259);
[self addChild:ground1];
What can I do?
A: CGSize size = [[CCDirector sharedDirector]viewS... | |
doc_23516162 | This is my BookRepository (data source):
public class BookRepository
{
public List<BookModel> SearchBook(string title, string authorName)
{
return DataSource().Where(x => x.Title.Contains(title) || x.Author.Contains(authorName)).ToList();
}
private List<BookModel> DataSource... | |
doc_23516163 | I have a main div (#page) that is: 980px wide
It has a child div (#content) that is also: 980px wide
Inside the div (#content) there are two divs (#left-pane), which is 300px wide and (#right-pane), which is 676 px wide.
Both of them have a 1px border all the way around - looking across the site horizontally this shoul... | |
doc_23516164 | So I am trying to find an alternative to decode H264 video. I am trying to use FFmpeg to decode these video even if there are some possible LGPL license issues. I decode H264 video without any problems and I render H264 frames thanks to OpenGL ES texture. But there are some performance issues. I instrumented my code an... | |
doc_23516165 | The following code works when it is set to the local address:
Server:
static void Main(string[] args)
{
TcpListener serverSocket = new TcpListener(9000);
TcpClient clientSocket = default(TcpClient);
int counter = 0;
serverSocket.Start();
Console.WriteLine("Chat Server Started ....");
counter = ... | |
doc_23516166 | const Agenda = require('agenda')
const agenda = new Agenda({db: {address: process.env.MONGO_URL}})
agenda.define('example-job', (job) => {
console.log('took a job -', job.attrs._id)
})
So now, let's say I queue up up 11 agenda jobs like this:
const times = require('lodash/times')
times(11, () => agenda.now('example... | |
doc_23516167 | let aString: String = txt_description.text
let newString = aString.stringByReplacingOccurrencesOfString(varattherate, withString:"@\(getText) ", options: NSStringCompareOptions.LiteralSearch, range: NSMakeRange(0, 10))
Acutely The problem is , i have replace text from string
my String is "my name is @test but... | |
doc_23516168 | Here is the code:
In store.js
import { combineReducers, compose, createStore } from 'redux';
import firebase from 'firebase';
import 'firebase/firestore';
import { reactReduxFirebase, firebaseReducer } from 'react-redux-firebase';
import { reduxFirestore, firestoreReducer } from 'redux-firestore';
//Reducers
cons... | |
doc_23516169 | Here is the screenshot of build path.
What should I do for the connect mysql
Here is the code
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
try{
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManage... | |
doc_23516170 | @objc func buttonAction(sender: UIButton!) {
let newController = JobTableViewController()
self.navigationController?.present(newController, animated: true, completion: nil)
}
But every time I click on this Button I get following Error in my ViewController at this code line
tableView.delegate = self
Thread 1:... | |
doc_23516171 | [{id: 1, name: 'max'}, {id: 2, name: 'jhon'}, {id: 3, name: 'anna'}]
If possible, what is the best way to do this?
A:
Sure!
let arrOfObj = [
{ name: 'John', lastName: 'Doe' },
{ name: 'Jane', lastName: 'Doe' }
]
axios.post('url_here',arrOfObj)
.then(console.log)
.catch(console.log)
A: Yes, it's very possible... | |
doc_23516172 |
A: You can get the referrer via the built-in $_SERVER['HTTP_REFERER'] variable. So use that in the php page that your link/image refers to. Then just have some code on that same php page to stick it where you need it via insertion to a database, or whatever other method you prefer.
A: Just a note: If you create the i... | |
doc_23516173 | This seems to have been raised a few times on here, but I can't seem to find a solution. I've cleared the route cache, and when i do api:routes the correct routes are in there.
Below is the routes file, and the controllers it should be sending too. I am only having the issue with the LeadController routes.
api.php
use ... | |
doc_23516174 | t=[0:0.001:10];
f = 0:0.001:2;
j = sqrt(-1);
num = [0 0 1];
den = [1 1 1];
[r,p,k] = residue(num,den)
A: Coefficients of numerator and denominator are the coefficients of corresponding ODE problem.
eq = @(t,z) [z(2); 1-z(1)-z(2)];
[t,y] = ode45(eq,[0,10],[0,0])
plot(t,y)
A: Using symbolic computation:
>> syms s;
... | |
doc_23516175 | The code is as follows.
Assembly assem = Assembly.LoadFrom(file);
sw = Stopwatch.StartNew();
var types1 = assem.GetTypes();
sw.Stop();
double time1 = sw.Elapsed.TotalMilliseconds;
I'd like to unload and reload the dll to check the time to spend in running GetTypes() again.
*
*How can I unload it? assem = null is go... | |
doc_23516176 | from rich.panel import Panel
from rich.table import Table
from rich.console import Console
console = Console()
table1 = Table()
table1.add_column("a")
table1.add_column("b")
table1.add_row("a", "b")
table1.add_row("a", "b")
table2 = Table()
table2.add_column("c")
table2.add_column("d")
table2.add_row("c", "d")
... | |
doc_23516177 | When restoring the backup file, I get this error:
TITLE: Microsoft SQL Server Management Studio
Restore of database 'TravelEnterDB' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: BACKUP LOG cannot be performed because there is no current database... | |
doc_23516178 |
A: As others have pointed out, isKindOf: and isMemberOf: are your friends when you're trying to figure this kind of thing out, but calling those methods is usually a kind of code smell. There are almost always better ways to do this, which I'll break into two categories:
*
*Implement the method on all relevant cla... | |
doc_23516179 | I know you could sort Posts (for example) in order by using Post.order(:cached_weighted_average => :desc)but could I find a way of ranking Posts by the number of a user's friends who had upvoted a post?
I could do something like <% @posts_ranked_by_friend_likes = current_user.friends & Post.get_upvotes.voters %> <%= @p... | |
doc_23516180 | app.js
var app = angular.module('Location', []). <br />
config(['$routeProvider', function ($routeProvider) { <br />
$routeProvider. <br />
when('/', { templateUrl: 'pages/desktop/locationList.html', controller: Location }). <br />
when('/locationDetail/:projectId', { <br />
templat... | |
doc_23516181 | Current Behaviour
Able to toggle the css class between the two h1 tags but unable to toggle after enabling toggle; meaning unable to remove css class on the h1 tag where css class is already enabled.
Intended Behaviour
On click of the same active h1, it should remove the css class.
Link to the REPL, also the same code ... | |
doc_23516182 | I'm writing a simple game which has a very simple clock counter.
I'm trying to add every second to span innerHTML/innerText.
here's my code:
HTML:
<span>Time: <span id="game_time";>0</span></span>
JS:
var stopTimerId;
var timeInSeconds = 1;
var intervalSeconds = 1000;
var game_time = document.getElementById("game_time"... | |
doc_23516183 |
dispatch_async(dispatch_get_main_queue(),{
let path = GMSPath(fromEncodedPath: rout)
var polilin = GMSPolyline(path: path)
polilin = GMSPolyline(path: path)
polilin.title = "WALK"
polilin.strokeWidth = 4.0
polilin.strokeColor = UIColor.redColor()
polilin.map = se... | |
doc_23516184 | I can see them in the git source code under dist/lib/filter (https://github.com/ag-grid/ag-grid/tree/master/dist/lib/filter) but they are not available in the code under node_modules/ag-grid-community after installation.
My app contains classes that extends BaseFilter, and it's using all of the mentioned interfaces. I ... | |
doc_23516185 | I have a database with 2 tables: jobs and timers.
In timers, I store the users' working time.
The structure of the database is as follows:
job_id,
user_id,
status,
started,
stopped,
Ajax works OK when the record is missing from the database - the user with job_id was not found in the Timers table. However, it does not ... | |
doc_23516186 | MapPolyline polyline = new MapPolyline();
polyline.Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Blue);
polyline.Locations = new LocationCollection() {
new Location(47.6424, ,-122.3219),
new Location(47.8424,-122.1747),
new Location(47.67856,-122.130994)};
myMap.Children.... | |
doc_23516187 | This is my current code:
import {Component} from '@angular/core';
import {Router, ROUTER_DIRECTIVES, RouteParams} from '@angular/router';
@Component({
moduleId: module.id,
selector: 'NewJob',
templateUrl: 'newJob.html',
directives: [ROUTER_DIRECTIVES, Footer]
})
export class NewJob {
router: Router;
con... | |
doc_23516188 | Greatly appreciated. Here are the important snipits of code:
struct myExpenses
{
char *description;
float cost;
};
int main (void)
{
struct myExpenses *pData = NULL;
struct myExpenses expenses[60];
int exit=0;
int i = 0;
char buffer[81] = "";
printf("Please enter all your descriptions:\n");
for (i=0;i < 6... | |
doc_23516189 | [EnableQuery]
public class ProductsController : ODataController
{
[HttpGet]
[ODataRoute("InvokeMyUnBoundFunction(Id={id})")]
public IHttpActionResult InvokeMyUnBoundFunction(int id)
{
TestUnBound testObj= new TestUnBound();
testObj.Name = "Test" + id;
... | |
doc_23516190 | How can I get types.h and related files for building packages on Solaris or Illumos?
A: Assuming you use IPS 'pkg search 'types.h''
The Oracle Solaris 11 Cheat Sheet for Image Packaging System could be useful, too.
A: You need the system/header package.
I found this via http://pkg.oracle.com/solaris/release/en/search... | |
doc_23516191 | I have been trying to find and fix my spring boot error for days and couldn't find a solution. This error is making my application not work as intended. I have included both my console output and pom.xml. Please let me know what I have to fix in order for my application to run properly.
. ____ _ ... | |
doc_23516192 | Can you please look at my code and tell me what I'm doing wrong? Thank you.
import NameList from './NameList.js';
const ItemTable = (props) => {
const filteredNames = props.items.filter(function (item) {
return item.name !== null || item.name !== "";
});
return (
<ul>
{filtere... | |
doc_23516193 |
*
*My events can be dropped only into days later then today.
*My events cannot be dropped into dates before today.
Currently when dragging an event, the calendar's cells below the drag are being highlighted.
I would like to disable this highlight for days(cells) before today (per point #2)
Any idea how to disable... | |
doc_23516194 | I use VS2008, if reporting tools can work with asp.net it would be great!
A: there should be CrystalReports bundeled with VS2008. Or you should be able to use Microsoft Reporting
Here is a sample-walkthrough from MSDN
A: don't miss to take a look into List&Label Free Edition. It has an interesting approach of reporti... | |
doc_23516195 | Update:
This post was from when I was learning android with android 2.2, be sure to check if this is compatible with the api level you are working with.
Done alot of looking around for how to load progress bar with a timer, I've tried to use methods posted but always would get a pointer exception and or the testing ... | |
doc_23516196 | However, part of my modification to these apps requires me to use the Application.cfc rather then the existing .cfm file.
Is there any potiential problems of having both of these files in the same directory? Or will Coldfusion default to using one over the other (or will it run both?)
Thanks,
Steven
EDIT
Just to shine ... | |
doc_23516197 | $path-img : '../img';
@mixin background-images($img, $background-position, $background-repeat:no-repeat, $background-size:auto, $background-attachment:scroll, $background-color:transparent, $important) {
/*background-image: url('#{$path-img}/#{$img}');
background-repeat: $background-repeat;
background-position: $... | |
doc_23516198 |
A: I recommend UserDefaults. The most simple and minimal code approach is to create a global variable as opposed to using a singleton approach like this:
let defaults = UserDefaults.standard
You can then, from anywhere within the app access these defaults like this:
defaults.set(12, forKey: "HighScore")
You have no... | |
doc_23516199 | Dim js As New System.Web.Script.Serialization.JavaScriptSerializer
Dim utils As New Utilities.Common
Dim rc As RestSharp.RestClient
rc = New RestSharp.RestClient("https://www.someendpointurl")
Dim rr As New RestSharp.RestRequest(RestSharp.Method.POST)
rr.AddHeader("Authorization", "Basic " & RetrieveTokens("MSIC"))
Dim... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.