This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.context.annotation.ImportResource; | |
import org.springframework.data.mongodb.MongoDbFactory; | |
import org.springframework.data.mongodb.core.MongoTemplate; | |
import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver; | |
import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper; | |
import org.springframework.data.mongodb.core.convert.MappingMongoConverter; | |
import org.springframework.data.mongodb.core.mapping.MongoMappingContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace soLexiconManager | |
{ | |
partial class DlgWorker | |
{ | |
/// <summary> | |
/// Required designer variable. | |
/// </summary> | |
private System.ComponentModel.IContainer components = null; | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> | |
<servlet> | |
<description>Apache CXF REST Endpoint</description> | |
<display-name>cxfREST</display-name> | |
<servlet-name>cxfREST</servlet-name> | |
<servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class> | |
<init-param> | |
<param-name>jaxrs.serviceClasses</param-name> | |
<param-value>com.speechocean.soLexiconWeb.test.RESTWebServiceTest</param-value> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int CALLBACK BrowserCallbackProc(HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData) | |
{ | |
switch (uMsg) | |
{ | |
case BFFM_INITIALIZED: | |
::SendMessage(hWnd, BFFM_SETSELECTION, 1, lpData); | |
break; | |
default: | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static CStringA UTF16_UTF8(const CStringW& utf16) | |
{ | |
if (utf16.IsEmpty()) return ""; | |
CStringA utf8; | |
int cc = 0; | |
if ((cc = WideCharToMultiByte(CP_UTF8, 0, utf16, -1, NULL, 0, 0, 0) - 1) > 0) | |
{ | |
char * buf = utf8.GetBuffer(cc); | |
if (buf) WideCharToMultiByte(CP_UTF8, 0, utf16, -1, buf, cc, 0, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma comment(lib,"Version.lib") | |
#define MAX_LINE_LENGTH 4096 | |
CString GetFileVersion(LPCTSTR filePath) | |
{ | |
CString ret(_T("")); | |
DWORD dummy; | |
DWORD dwSize = GetFileVersionInfoSize(filePath, &dummy); | |
if (dwSize == 0) ret = _T("Error retriving version(Module Not Found)"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using System.Security.AccessControl; | |
using System.Security.Principal; | |
private bool FileCanWrite(string path) | |
{ | |
bool writeAllow = false; | |
bool writeDeny = false; | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'[Word] Convert auto generated number to plain text. | |
ActiveDocument.Content.ListFormat.ConvertNumbersToText | |
'[Excel] Clear all hyperlinks in current sheet (Useful when copy some linked sheet from web) | |
ActiveWorkbook.ActiveSheet.HyperLinks.Delete | |
'[Excel] Safest way get totol rows or cols count for specific table (http://stackoverflow.com/questions/6301665/how-to-count-the-number-of-rows-in-excel-with-data) | |
rowCnt = targetSheet.Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row | |
colCnt = targetSheet.Cells.Find("*", [A1], , , xlByColumns, xlPrevious).Column |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void splitContainer_Splitter_Paint(object sender, PaintEventArgs e) | |
{ | |
SplitContainer control = sender as SplitContainer; | |
if(control == null) return; | |
//paint the three dots' | |
Point[] points = new Point[3]; | |
int w = control.Width; | |
int h = control.Height; | |
int d = control.SplitterDistance; | |
int sW = control.SplitterWidth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace ProofReadingCorrect | |
{ | |
enum EditType | |
{ | |
NONE = 0, | |
CHANGE = 1, |
NewerOlder