Hello,
I have a signed Excel workbook and I want to delete the signature from it. The problem is that when I try to delete the signature there's a prompt for confirming the deletion and I want the process to be fully automatic.
Here's a code sample, the prompt appears when the last line executes:
Dim source As String = "c:\temp\signed.xlsx"
Dim app As New Application()
app.Visible = True
Dim book As Workbook = app.Workbooks.Open(source, UpdateLinks:=0)
app.ShowToolTips = False
Dim sig As Microsoft.Office.Core.Signature = book.Signatures.Item(1)
sig.Delete()
Thanks
I have two domains :
class CodeSet {
String id
String owner
String comments
String geneRLF
String systemAPF
static hasMany = [cartridges:Cartridge]
static constraints = {
id(unique:true,blank:false)
}
static mapping = {
table 'code_set'
version false
columns {
id column:'code_set_id', generator: 'assigned'
owner column:'owner'
comments column:'comments'
geneRLF column:'gene_rlf'
systemAPF column:'system_apf'
}
}
and :
class Cartridge {
String id
String code_set_id
Date runDate
static belongsTo = CodeSet
static constraints = {
id(unique:true,blank:false)
}
static mapping = {
table 'cartridge'
version false
columns {
id column:'cartridge_id', generator: 'assigned'
code_set_id column:'code_set_id'
runDate column:'run_date'
}
}
Actually, with those models, I get tables :
- code_set,
- cartridge,
- and table : code_set_cartridge (two fields : code_set_cartridges_id, cartridge_id)
I would like to not have code_set_cartridge table, but keep relationship :
code_set -- 1:n -- cartridge
In other words, how can I keep association between code_set and cartridge without intermediate table ? (using code_set_id as primary key in code_set and code_set_id as foreign key in cartridge).
Mapping with GORM can be done without intermediate table?
this is a part of my geocoding code. I want it to show only country of the selected place, but it shows all address components, My problem is I cant specify the address components object. There is a way of doing it that is written on documentation but I didnt understand, can you do it for me.
if (geocoder) {
geocoder.geocode({'latLng': latlng}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var str = "";
$.each(results, function(){
str += "address components: <ul>"
$.each(this.address_components, function(){
str +="<li>"+this.types.join(", ")+": "+this.long_name+"</li>";
});
str +="</ul>";
});
$("#geocode_info").html(str);
I am beginning on ASP.net MVC. All the articles I have read so far mention REST as a key feature in MVC implementation
My question: is REST mandatory for MVC implementation?
We have two tables: OriginalDocument and ProcessedDocument. In the first one we put an original, not processed document. After it's validated and processed (converted to our xml format and parsed), it's put into Document table. Processed document can be valid or invalid. Which makes more sense: have two different tables for valid and invalid documents or just have one with 'Valid' column? Some of the columns (~5-7) are irrelevant for invalid document. Storing both invalid and valid documents would also make Document table filled with 'NULL' columns (if document is invalid, information like document number, receiver can be unknown). What else should we consider and weigh, when making this decision?
My program has a component - dubbed the Scheduler - that lets other components register points in time at which they want to be called back. This should work much like the Unix cron service, i. e. you tell the Scheduler "notify me at ten minutes past every full hour".
I realize there are no real callbacks in Java.
Here's my approach, is there a library which already does this stuff? Feel free to suggest improvements, too.
Register call to Scheduler passes:
a time specification containing hour, minute, second, year month, dom, dow, where each item may be unspecified, meaning "execute it every hour / minute etc." (just like crontabs)
an object containing data that will tell the calling object what to do when it is notified by the Scheduler. The Scheduler does not process this data, just stores it and passes it back upon notification.
a reference to the calling object
Upon startup, or after a new registration request, the Scheduler starts with a Calendar object of the current system time and checks if there are any entries in the database that match this point in time. If there are, they are executed and the process starts over. If there aren't, the time in the Calendar object is incremented by one second and the entreis are rechecked. This repeats until there is one entry or more that match(es). (Discrete Event Simulation)
The Scheduler will then remember that timestamp, sleep and wake every second to check if it is already there. If it happens to wake up and the time has already passed, it starts over, likewise if the time has come and the jobs have been executed.
Edit: Thanks for pointing me to Quartz. I'm looking for something much smaller, however.
Hi, I'm really confused about the visitor pattern and its uses. I can't really seem to visualize the benefits of using this pattern or its purpose. If someone could explain with examples if possible that would be great. =)
Thanks in advance
For what real time scenarios/use cases one should go to Flex Technology ?
What real time problems you have solved using Flex Technology ?
What real time problems have you faced because of using Flex Technology and what was your work around for that use case ?
I am using the excellent jTemplates plugin to generate content.
Given a data object like this...
var data = {
name: 'datatable',
table: [
{id: 1, name: 'Anne'},
{id: 2, name: 'Amelie'},
{id: 3, name: 'Polly'},
{id: 4, name: 'Alice'},
{id: 5, name: 'Martha'}
]
};
..I'm wondering if it is possible to directly specify an object in an array of objects using $T. (I'm hoping there is something like $T.table:3 available)
Currently the only way I can think of to access a specific object in an array is to do something like this...
{#foreach $T.table as record}
{#if $T.record$iteration == 3}
This is record 3! Name: {$T.record.name}
{#/if}
{#/for}
However that seems clumsy...
Any suggestions?
Thanks
I just need a php based script for my website where in i have a textbox and a button and whatever i write into it gets posted into my facebooks wall ..
Also prior to this i will be logged into facebook
I have two classes that work seperate from another, but they extend the same class. Is it possible to have them work the same instance of the extended class. I'm wanting the constructor of the extended class to run only once.
I know this isn't right but something like this:
<?php
$oApp = new app;
class a extends $oApp {}
class b extends $oApp {}
This is my code:
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'publish_actions',
'redirect_uri' => 'http://mysite.com/',
));
It works but if I remove redirect_uri it doesn't work anymore.
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'publish_actions'
));
According to Facebook domcumentation redirect_uri is optional.
https://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/
Im trying to redirect the users to the same url they were on before logging in.
Update: This problem occurs when the url is mysite.com/post23 but when url is mysite.com/staticpage or mysite.com there are no problems
Any workarounds?
EDIT: It looks like a bug, it doesn't work with certain url in the same site
I wil try and report it to Facebook.
hi,
I devloped a facebook app with fbml canvas.
Sometimes for me it loads a blank page (say 1/10 time). For a user in another location is always loads with blank page.
Is it the problem with facebook or my hosting.
Please help me out to resolve this problem.
Thanks in advance.
What is the relationship between delegate, proxy and adapter patterns? It seems they are all similar in terms of doing something on behalf of another object.
Can anyone summarize the relationship and difference between these 3 patterns? Thanks!
Hi,
I have to search a 25 GB corpus of wikipedia for a single word. I used grep but it takes lot of time. Is there a efficient and easy representation that can be made to search quickly. Also, I want to find exact match.
Thank you.
Suppose I have two tables, Customer and Vendor. I want to have a common address table for customer and vendor addresses. Customers and Vendors can both have one to many addresses.
Option 1
Add columns for the AddressID to the Customer and Vendor tables. This just doesn't seem like a clean solution to me.
Customer Vendor Address
-------- --------- ---------
CustomerID VendorID AddressID
AddressID1 AddressID1 Street
AddressID2 AddressID2 City...
Option 2
Move the foreign key to the Address table. For a Customer, Address.CustomerID will be populated. For a Vendor, Address.VendorID will be populated. I don't like this either - I shouldn't need to modify the address table every time I want to use it for another entity.
Customer Vendor Address
-------- --------- ---------
CustomerID VendorID AddressID
CustomerID
VendorID
Option 3
I've also seen this - only 1 foreign key column on the Address table with another column to identify which foreign key table the address belongs to. I don't like this one because it requires all the foreign key tables to have the same type of ID. It also seems messy once you start coding against it.
Customer Vendor Address
-------- --------- ---------
CustomerID VendorID AddressID
FKTable
FKID
So, am I just too picky, or is there something I haven't thought of?
I'm designing a MongoDB database that works with a script that periodically polls a resource and gets back a response which is stored in the database. Right now my database has one collection with four fields , id, name, timestamp and data.
I need to be able to find out which names had changes in the data field between script runs, and which did not.
In pseudocode,
if(data[name][timestamp]==data[name][timestamp+1]) //data has not changed
store data in collection 1
else //data has changed between script runs for this name
store data in collection 2
Is there a query that can do this without iterating and running javascript over each item in the collection? There are millions of documents, so this would be pretty slow.
Should I create a new collection named timestamp for every time the script runs? Would that make it faster/more organized? Is there a better schema that could be used?
The script runs once a day so I won't run into a namespace limitation any time soon.
This is a repeated question and I have followed both the suggestions provided in these StackOverflow links:
How to log-out users using FaceBook connect in php and zend
Trouble logging out of a FaceBook connect site and destroying sessions
The issue is - the code works 90% of the time. Thats the weird part. Out of the 100 times I've logged in and out - I've experienced this problem 5-6 times and 2 of my beta test users have reported the same issue.
So when it works- if u click the logout link - u get the facebook popup saying - you being logged out - when it does'nt work - absolutely nothing happens - the page does not refresh - it just sits on that page doing nothing.
This is the javascript code that gets called on clicking logout
function logout()
{
FB.Connect.get_status().waitUntilReady(function(status) {
switch(status) {
case FB.ConnectState.connected:
FB.Connect.logoutAndRedirect("http://www.example.com/login/logout");
break;
case FB.ConnectState.userNotLoggedIn:
window.location = "http://www.example.com/login/logout";
break;
}
});
return false;
}
This is the php code:
$this-_auth-clearIdentity();
$face = Zend_Registry::get('facebook');
$fb = new Facebook($face['appapikey'], $face['appsecret']);
//$fb-clear_cookie_state();
$fb-expire_session();
Anyone experienced such sporadic issues.
Thanks
I'm working on a project where I had to add a data layer to my application. I've always thought that the data layer is purely responsible for CRUD functions ie. shouldn't really contain any logic but should simply retrieve data for the business layer to manipulate.
However I'm a little confused with my project because I'm not sure whether I've structured my app correctly for this scenario.
Basically I'm trying to retrieve a list of products from the database that fall within a certain pricing threshold. At the moment I have a function in my data layer that basically returns all products where price min threshold and price < max threshold. But it got me thinking that maybe this is incorrect. Should the data layer simply return a list of ALL products and then the business logic do the filtering?
I'm pretty confused over whether the data layer should simply provide methods that allow the business layer to get raw data or whether it should be responsible for getting filtered data too?
If anyone has an article or something explaining this in detail it'd be very helpful.
Thanks
Hi,
i have a similar issue as espoused in http://stackoverflow.com/questions/695752/product-table-many-kinds-of-product-each-product-has-many-parameters
i am convinced to use RDF now. only because of one of the comments made by Bill Karwin in the answer to the above issue
but i already have a database in mysql and the code is in php.
1) So what RDF database should I use?
2) do i combine the approach? meaning i have a class table inheritance in the mysql database and just the weird product attributes in the RDF? I dont think i should move everything to a RDF database since it is only just products and the wide array of possible attributes and value that is giving me the problem.
3) what php resources, articles should i look at that will help me better in the creation of this?
4) more articles or resources that helps me to better understand RDF in the context of the above challenge of building something that will better hold all sorts of products' attributes and values will be greatly appreciated. i tend to work better when i have a conceptual understanding of what is going on.
Do bear in mind i am a complete novice to this and my knowledge of programming and database is average at best.
I'm creating josi, a web framework for node.js. And I'd like to add session storage. What would be the best way to implement this? I'm assuming it probably has to be cookie based, but I'm interested in knowing if any other frameworks have a different approach.
I've been tasked with revisiting a database schema we designed and use internally for various ticketing and reporting systems. Currently there exists about 40 tables in one Oracle database schema supporting perhaps six webapps.
However, there's one unifying relationship amongst them all: a rooms table describing the room. Room name, purpose and other data are thrown into a shared table for each app. My initial idea was to pull each of these applications into a separate database, and perform joins between a given database and the room database. But I've discovered this solution prevents foreign key constraints in SQL Server 2005. It seems silly to duplicate one table for each app and keep those multiple copies synchronized.
Should I just leave everything in one large DB, or is there something else I can do separate the tables without losing FK constraints?